﻿.calendar-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.navigation {
    display: flex;
    gap: 5px;
    align-items: center;
}

.month-select {
    width: 120px;
}

.year-input {
    width: 80px;
}

.calendar-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.calendar-wrapper {
    flex: 1;
}

.event-controls {
    width: 300px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
}

.holiday {
    background-color: #ffe6e6 !important;
    color: #cc0000 !important;
}

.holiday:hover {
    background-color: #ffcccc !important;
}

@@media (max-width: 768px) {
    .calendar-content {
        flex-direction: column;
    }

    .event-controls {
        width: 100%;
    }
}

.calendar-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.navigation {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.month-select {
    width: 120px;
}

.year-input {
    width: 80px;
}

.day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.5rem;
    font-weight: bold;
    text-align: center;
}

.days-grid {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    gap: 2px;
}

.week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.day {
    padding: 0.5rem;
    min-height: 100px;
    border: 1px solid #eee;
    cursor: pointer;
    position: relative;
    background: white;
    transition: all 0.2s;
}

.day:hover {
    background: #f8f9fa;
    transform: scale(1.02);
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.large-date {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.tithi {
    font-size: 0.7rem;
    font-weight: normal;
    text-align: center;
    vertical-align: middle;
    color: #2c3e50;
}

.small-date {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.other-month {
    background-color: #f8f9fa;
    color: #95a5a6;
}

.today {
    background-color: #e3f2fd !important;
    border-color: #90caf9;
}

.selected {
    background-color: #bbdefb !important;
    border-color: #64b5f6;
}

.toggle-btn {
    height: fit-content;
    align-self: center;
}

.other-month {
    background-color: #f8f9fa;
    color: #999;
}

    .other-month .large-date {
        color: #95a5a6;
    }

.selected {
    background-color: #e3f2fd !important;
    border: 2px solid #2196f3 !important;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}

.today {
    background-color: #fff3e0 !important;
    border: 1px solid #ffb74d !important;
}

.selected .large-date {
    color: #1976d2;
    font-weight: bold;
}

.today .small-date {
    color: #ef6c00;
    font-weight: bold;
}

.selected-date-container {
    margin-top: 2rem;
    max-width: 800px;
    margin: 20px auto;
}

.selected-date-card {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.date-display {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.date-format {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.date-label {
    font-weight: bold;
    min-width: 60px;
    color: #2c3e50;
}

.date-value {
    margin-left: 15px;
    font-family: monospace;
}

.events-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.events-list {
    margin-top: 10px;
}

.no-events {
    color: #95a5a6;
    font-style: italic;
    margin: 10px 0;
}

.custom-event-content {
    margin-top: 15px;
    padding: 10px;
    background: #fff;
    border: 1px dashed #ddd;
}

.calendar-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.calendar-wrapper {
    flex: 1;
}

.event-controls {
    width: 300px;
}

@media (max-width: 768px) {
    .calendar-content {
        flex-direction: column;
    }

    .event-controls {
        width: 100%;
    }
}


.event-titles {
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.6em;
    line-height: 1.2;
    padding: 0 2px;
}

.event-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #cc0000;
    font-weight: bold;
}

.day {
    position: relative;
    min-height: 60px; /* Ensure enough space for titles */
}

.event-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}



.calendar-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

    .calendar-table th,
    .calendar-table td {
        border: 1px solid #e0e0e0;
        vertical-align: top;
        width: 14.2857%; /* 100% / 7 */
        height: 90px;
        padding: 6px;
        cursor: pointer;
        position: relative; /* required for absolute children */
        box-sizing: border-box;
        overflow: hidden;
    }

        .calendar-table th.day-header {
            background: #f8f9fa;
            font-weight: 600;
            font-size: 12px;
            padding: 4px 6px;
            height: 28px;
            text-align: center;
        }

/* small AD date at top-right */
.small-date {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 11px;
    color: #666;
    z-index: 2;
}

/* large date centered */
.center-date {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.large-date {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

/* tithi bottom-left */
.tithi {
    position: absolute;
    bottom: 2px;
    left: 4px;
    font-size: 11px;
    color: #007bff;
}

/* highlights / states */
.today {
    background: #f0fbff;
}

.selected {
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

.other-month {
    color: #9aa0a6;
}

.holiday {
    color: #dc3545;
    font-weight: 600;
}

td.holiday .large-date,
td.holiday .small-date,
td.holiday .tithi {
    color: #dc3545;
    font-weight: 700;
}

.calendar-table td:hover {
    background: #fbfcff;
}

/* Responsive tweaks */
@@media (max-width: 600px) {
    .calendar-table th.day-header {
        font-size: 11px;
        height: 22px;
    }

    .calendar-table td {
        height: 96px;
        padding: 4px;
    }

    .large-date {
        font-size: 22px;
    }
}

