/* Base Styles */
body {
    background-color: #ffffff;
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden; 
}

/* --- Grid System --- */
#weekDaysHeader {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid #000;
    border-left: 1px solid #000;
    background-color: #f3f4f6;
}

.day-header {
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    text-align: center;
    padding: 10px 0;
    font-weight: bold;
    color: #000;
    font-size: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-left: 1px solid #000; 
    background-color: #fff;
}

.calendar-cell {
    min-height: 100px;
    border-right: 1px solid #000; 
    border-bottom: 1px solid #000; 
    background: white;
    position: relative;
    padding: 5px;
}

.calendar-cell.padding-day {
    background-color: #f3f4f6;
}

/* New class for Pro Mode weekends */
.calendar-cell.off-day {
    background-color: #f3f4f6 !important;
}

.day-number {
    font-weight: 600;
    color: #000;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 4px;
}

/* Holiday Text Style */
.holiday-text {
    display: block;
    font-size: 0.75rem;
    color: #059669; /* Emerald 600 */
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.1;
}

.day-content {
    height: 70%; 
    width: 100%;
    outline: none;
    font-size: 0.9rem;
    color: #000;
    white-space: pre-wrap;
    overflow: hidden;
}

/* Controls Area */
.controls-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 10px;
    flex-wrap: wrap; 
    gap: 15px;
}

.btn-print {
    background-color: #EF4444;
    color: white;
    font-weight: bold;
    padding: 10px 24px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}
.btn-print:hover {
    background-color: #DC2626;
}

/* Shared style for toggle buttons */
.btn-toggle {
    background-color: white;
    color: #4B5563; /* black */
    font-weight: bold;
    padding: 9px 15px;
    border-radius: 4px;
    border: 2px solid #9CA3AF;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-toggle:hover, .btn-toggle.active {
    background-color: #F3F4F6;
    border-color: #6B7280;
    color: #111827;
}
.btn-toggle.active {
    background-color: #E5E7EB;
    border-color: #4B5563;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
    main {
        padding: 10px !important;
        gap: 0 !important;
    }

    .day-header {
        font-size: 0.8rem; 
        padding: 5px 0;
    }

    .calendar-cell {
        min-height: 70px; 
        padding: 2px;
    }

    .day-number {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }
    .holiday-text {
        font-size: 0.65rem; 
        margin-bottom: 2px;
    }
    .day-content {
        font-size: 0.75rem;
        line-height: 1.1;
    }

    #monthDisplay {
        font-size: 1.5rem; 
    }
    /* Stack controls on mobile */
    .controls-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .controls-area > div {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .btn-print, .btn-toggle {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Print Specific Styles */
@media print {
    @page {
        margin: 0.5cm;
        size: landscape;
    }

    body {
        background: white;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        overflow: visible;
    }

    .no-print, aside {
        display: none !important;
    }

    main {
        padding: 0 !important;
        display: block !important;
        max-width: 100% !important;
    }

    .calendar-container {
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    #weekDaysHeader, .calendar-grid {
        width: 100%;
    }

    .calendar-cell {
        min-height: 130px;
    }
    
    #weekDaysHeader, .calendar-cell.padding-day, .calendar-cell.off-day {
        background-color: #f3f4f6 !important;
    }
    
    h1 {
        font-size: 28pt;
        text-align: center;
        margin-bottom: 20px;
        display: block;
        width: 100%;
    }
    
    .controls-area {
        display: block;
        text-align: center;
    }
    .controls-area button {
        display: none;
    }
    i { display: none; }
    
    .holiday-text {
        color: #047857 !important; 
    }
}

/* --- New Styles for Logo & Navigation --- */

/* Text Logo Style */
.logo-text-link {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem; /* Bigger text */
    font-weight: 800; /* Extra bold */
    color: #111827; /* Dark black/gray */
    text-decoration: none;
    letter-spacing: -0.03em; /* Tighter modern spacing */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-text-link span {
    color: #EF4444; /* Your Brand Red */
}
.logo-text-link:hover {
    opacity: 0.9;
}

/* New Navigation Buttons (Prev/Next) */
.nav-btn {
    background-color: #ffffff;
    border: 1px solid #e5e7eb; /* Subtle gray border */
    color: #374151;
    padding: 8px 16px;
    border-radius: 8px; /* Slightly rounded corners */
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

.nav-btn:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #000;
    transform: translateY(-1px); /* Slight lift effect */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-btn:active {
    transform: translateY(0);
}