/* ============================================
   OVULATION CALCULATOR — PureTools
   All classes namespaced .ov-*
   ============================================ */

.ov-calculator {
    max-width: 940px;
    margin: 0 auto;
}

/* ===== Layout ===== */
.ov-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* ===== Input card ===== */
.ov-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ov-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.1rem;
}

.ov-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.ov-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.ov-calc-btn {
    min-height: 44px;
    width: 100%;
    font-size: 0.95rem;
}

.ov-error {
    font-size: 0.85rem;
    color: var(--danger);
    min-height: 1.1em;
    margin: 0;
}

.ov-disclaimer {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
}

/* ===== Results column ===== */
.ov-results-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ov-empty {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== Hero card ===== */
.ov-hero-card {
    background: linear-gradient(135deg, #ec4899, #f97316);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ov-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 75% 25%, rgba(255,255,255,.15) 0%, transparent 60%);
    pointer-events: none;
}

.ov-hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.8);
    margin: 0 0 0.35rem;
}

.ov-hero-date {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--on-primary);
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.ov-hero-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,.8);
    margin: 0;
}

/* ===== Key dates card ===== */
.ov-dates-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.ov-date-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.ov-date-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
}

.ov-date-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.ov-peak-text { color: #d97706; }
.ov-due-text  { color: var(--primary); }
.ov-fertile-text { color: #059669; }

/* ===== Actions ===== */
.ov-actions {
    display: flex;
    gap: 0.75rem;
}

.ov-copy-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0 1.25rem;
    font-size: 0.875rem;
}

/* ===== 3-cycle calendar section ===== */
.ov-cycles-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.1rem 1.25rem;
}

.ov-cycles-heading {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.75rem;
}

/* Legend */
.ov-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.ov-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.ov-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.ov-legend-dot.ov-period  { background: #fca5a5; }
.ov-legend-dot.ov-fertile { background: #6ee7b7; }
.ov-legend-dot.ov-peak    { background: #fcd34d; }
.ov-legend-dot.ov-today-dot {
    background: transparent;
    border: 2px solid var(--primary);
}

/* ===== Calendars container ===== */
.ov-calendars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ov-cycle-card {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.ov-cycle-card:first-child { border-top: none; padding-top: 0; }

.ov-cycle-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== Calendar table ===== */
.ov-cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.ov-cal-table th {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    padding: 0 0 0.35rem;
}

.ov-cal-table td {
    text-align: center;
    vertical-align: middle;
    font-size: 0.78rem;
    padding: 2px;
    height: 32px;
    border-radius: 4px;
    cursor: default;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.ov-cal-table td.ov-period  { background: #fca5a5; color: #7f1d1d; font-weight: 500; }
.ov-cal-table td.ov-fertile { background: #6ee7b7; color: #065f46; font-weight: 500; }
.ov-cal-table td.ov-peak    { background: #fcd34d; color: #78350f; font-weight: 700; }
.ov-cal-table td.ov-today   { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 4px; font-weight: 700; }
.ov-cal-table td:empty       { background: transparent; }

[data-theme="dark"] .ov-cal-table td.ov-period  { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .ov-cal-table td.ov-fertile { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .ov-cal-table td.ov-peak    { background: #78350f; color: #fcd34d; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .ov-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ov-row-2 { grid-template-columns: 1fr 1fr; }
    .ov-actions { flex-direction: column; }
    .ov-copy-btn { width: 100%; justify-content: center; }
    .ov-hero-date { font-size: 1.6rem; }
    .ov-date-row { flex-direction: column; gap: 0.1rem; }
    .ov-date-val { font-size: 0.875rem; }
}
