/* ===================================================
   GLOBAL RESET
=================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

h2 {
    text-align: center;
}



/* ===================================================
   CALENDAR WRAPPER
=================================================== */
.calendar-wrapper {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin: 25px auto;
    max-width: 520px;
}


/* ===================================================
   CALENDAR HEADER
=================================================== */
.calendar-header {
    background: linear-gradient(135deg, #fbac07 0%, #f59e0b 100%);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    box-shadow: 0 3px 10px rgba(251, 172, 7, 0.25);
}

.calendar-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.calendar-header button {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.calendar-header button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}


/* ===================================================
   CALENDAR GRID
=================================================== */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 15px;
}

.day-header {
    text-align: center;
    font-weight: 600;
    color: #555;
    padding: 10px 0;
    font-size: 13px;
    text-transform: uppercase;
}


/* ===================================================
   BASE DAY STYLE
=================================================== */
.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #f8f9fa;
    color: #333;
    border: 2px solid transparent;
    min-height: 42px;
    transition: all 0.2s ease;
}

.day:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.day.empty {
    background: transparent;
    cursor: default;
    pointer-events: none;
}


/* ===================================================
   DAY STATES
=================================================== */
.day.today {
    border: 2px solid #fbac07;
    background: #fffbf0;
    font-weight: 700;
}

.day.selected {
    background: linear-gradient(135deg, #fbac07 0%, #f59e0b 100%);
    color: white;
    font-weight: 700;
    border-color: #fbac07;
    box-shadow: 0 4px 12px rgba(251, 172, 7, 0.4);
}

/* FULL SLOT */
.day.full {
    background: #e3191d;
    color: #ffffff;
    cursor: not-allowed;
}

.day.full:hover {
    transform: none;
    box-shadow: none;
}

/* HOLIDAY */
.day.holiday {
    background: #fef3c7;
    color: #92400e;
    cursor: not-allowed;
}

.day.holiday:hover {
    transform: none;
}

/* CLOSED */
.day.closed {
    background: #fee2e2;
    color: #991b1b;
    cursor: not-allowed;
}

.day.closed:hover {
    transform: none;
}


/* ===================================================
   SELECTED DATE INFO
=================================================== */
.selected-date {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 8px;
    margin: 20px auto 0;
    text-align: center;
    font-size: 14px;
    max-width: 520px;
}

.selected-date strong {
    font-weight: 700;
}


/* ===================================================
   TIME SLOTS
=================================================== */
.time-slots {
    margin: 25px auto 0;
    max-width: 520px;
}

.time-slots h3 {
    font-size: 17px;
    margin-bottom: 15px;
    text-align: center;
}

.slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 10px;
}

.time-slot {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    background: #ffffff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.time-slot:hover {
    background: #fffbf0;
    border-color: #fbac07;
}

.time-slot.selected {
    background: linear-gradient(135deg, #fbac07 0%, #f59e0b 100%);
    color: white;
    border-color: #fbac07;
}

.time-slot.full {
    background: #e3191d;
    color: white;
    cursor: not-allowed;
}


/* ===================================================
   LEGEND
=================================================== */
.legend {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
}

.legend-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid #d1d5db;
}

.legend-box.tersedia { background: #f8f9fa; }
.legend-box.penuh { background: #e3191d; }
.legend-box.holiday { background: #fef3c7; }
.legend-box.closed { background: #fee2e2; }


/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 768px) {
    .calendar-wrapper {
        padding: 15px;
        max-width: 100%;
    }

    .day {
        font-size: 13px;
        min-height: 38px;
    }
}

@media (max-width: 480px) {
    .day {
        font-size: 12px;
        min-height: 35px;
    }

    .calendar-header h2 {
        font-size: 14px;
    }
}

.day.past-date {
    background: #f9fafb;
    color: #bfbfbf;
    border: 1px solid #eee;
    cursor: not-allowed;
    pointer-events: none;
}

.day.umroh-limit {
    background: #f2f2f2;
    color: #aaa;
    cursor: not-allowed;
}
