/* ========================================
   PREMIUM DASHBOARD HEADER
======================================== */
.calendar-dashboard-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.date-titles h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--navy);
    font-weight: 700;
}

.tamil-date-text {
    margin: 5px 0 0 0;
    font-size: 1.05rem;
    color: var(--text-sub);
}

/* ========================================
   TIMEZONE BADGE (IST)
======================================== */
.timezone-badge {
    font-size: 0.75rem;
    background-color: var(--bg-light);
    color: var(--navy);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* ========================================
   DATE NAVIGATION CONTROLS (T-SHAPE GRID)
======================================== */
.date-nav-controls {
    display: grid;
    /* Use fractional units so it fluidly fits any desktop screen */
    grid-template-columns: 1fr 1.5fr 1fr; 
    grid-template-areas:
        "prev date next"
        ". today .";
    gap: 12px 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

#prev-day    { grid-area: prev; }
#date-picker { grid-area: date; }
#next-day    { grid-area: next; }
#today-btn   { grid-area: today; }

/* Force unified dimensions but inherit common.css visuals */
.date-nav-controls button,
.date-nav-controls input[type="date"] {
    height: 48px !important; 
    margin: 0 !important; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.2;
}

/* Desktop typography protection */
@media (min-width: 769px) {
    .date-nav-controls button,
    .date-nav-controls input[type="date"] {
        white-space: nowrap; /* Keeps text neat on large screens */
    }
}

.date-nav-controls input[type="date"] {
    padding: 0 10px;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    color: var(--text-main);
}

.date-nav-controls input[type="date"]::-webkit-datetime-edit { display: flex; justify-content: center; width: 100%; }
.date-nav-controls input[type="date"]::-webkit-datetime-edit-fields-wrapper { display: flex; justify-content: center; padding: 0; }
.date-nav-controls input[type="date"]::-webkit-calendar-picker-indicator { margin-left: auto; }

.date-nav-controls #today-btn {
    width: 100%;
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   MINDFUL MORNING COLOR PALETTE (CARDS)
======================================== */
.timing-card {
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
    border: 1px solid var(--border);
}

.timing-card:hover { transform: translateY(-2px); }

.timing-good { background-color: #f0fdf4; border-left: 5px solid #22c55e; }
.timing-good .info-label { color: #166534; font-weight: 600; }
.timing-good .info-value { color: #14532d; font-weight: 700; }

.timing-caution { background-color: #fff1f2; border-left: 5px solid #f43f5e; }
.timing-caution .info-label { color: #9f1239; font-weight: 600; }
.timing-caution .info-value { color: #881337; font-weight: 700; }

.timing-neutral { background-color: #f0f9ff; border: 1px solid #bae6fd; }

.timing-card .info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    align-items: center;
}

.timing-card .info-row:last-child { border-bottom: none; padding-bottom: 0; }

/* ========================================
   DASHBOARD GRID STRUCTURE
======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.info-card h3 {
    color: var(--navy);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    align-items: center;
}

.info-row:last-child { border-bottom: none; padding-bottom: 0; }

.info-label { color: var(--text-sub); font-weight: 500; font-size: 0.95rem; }
.info-value { font-weight: 700; color: var(--text-main); text-align: right; font-size: 0.95rem; }

.events-list { padding-left: 20px; line-height: 1.8; margin: 0 0 20px 0; }
.events-list li { margin-bottom: 8px; }

.upcoming-events-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 15px;
    border-radius: 8px;
}

.upcoming-chip { font-size: 0.9rem; color: var(--text-sub); }
.upcoming-chip strong { color: var(--navy); }

/* ========================================
   RESPONSIVE DESIGN (STRICT 2x2 MOBILE GRID)
======================================== */
@media (max-width: 768px) {
    .date-nav-controls {
        /* Force a strict 50% split */
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "prev date"
            "today next";
        gap: 10px;
    }

    .date-nav-controls button,
    .date-nav-controls input[type="date"] {
        width: 100% !important; 
        font-size: 0.85rem !important; 
        padding: 0 5px !important; /* Safely overrides common.css padding */
        
        /* The Magic Fix: Allows Tamil words to stack on tiny screens */
        white-space: normal !important; 
    }
}