/* =========================
   BASE LAYOUT
========================= */

.calendar-container{
    display:flex;
    gap:30px;
    margin-top:20px;
    flex-wrap:wrap;
}

/* Calendar */
.calendar-wrapper{
    width: 420px;
    max-width: 100%;
    height: 320px;
}

/* Header */
.calendar-header{
    text-align:center;
    font-size:22px;
    font-weight:bold;
    margin-bottom:20px;
}

/* Grid */
.weekdays,
.calendar-grid{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:8px;
}

.weekday{
    text-align:center;
    font-weight:bold;
    color:#666;
    padding:10px 0;
}

/* Days */
.day,.empty{
    height:60px;
}

.day button{
    width:100%;
    height:100%;
    border:none;
    border-radius:12px;
    cursor:pointer;
    font-weight:600;
    transition:.2s;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:2px;
}

.day button small{
    font-size:10px;
    font-weight:500;
    opacity:.8;
}

/* States */
.available{
    background:#0024ee;
    color:#fff;
}

.full{
    background:#f1f1f1;
    color:#999;
    cursor:not-allowed;
}

.active-day{
    outline:3px solid #0d6efd;
}

.fully-booked {
    color: red;
    font-weight: bold;
}

/* =========================
   TIME SLOTS
========================= */

.time-slots{
    flex:1;
    min-width:100px;
    background:#fff;
    padding:15px;
    border-radius:10px;
    box-shadow:0 2px 10px rgba(0,0,0,0.08);
}

.slot-card{
    padding:12px 15px;
    margin:10px 0;
    border-radius:10px;
    cursor:pointer;
    transition:0.2s;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border:1px solid transparent;
}

.slot-card.available:hover{
    transform:scale(1.02);
    background:#dff1ff;
    border-color:#2563eb;
}

.slot-card.full{
    background:#f3f3f3;
    color:#888;
    cursor:not-allowed;
}

.slot-time{
    font-weight:600;
    font-size:15px;
}

.slot-status{
    font-size:13px;
    opacity:0.8;
}

.slot-empty{
    text-align:center;
    padding:30px;
    color:#777;
    font-size:14px;
}

/* =========================
   MODAL
========================= */

.modal {
    display:none;
    position:fixed;
    z-index:1000;
    inset:0;
    background:rgba(0,0,0,0.5);
}

.modal.show { display:block; }

.modal-content {
    background:#fff;
    padding:20px;
    margin:50px auto;
    max-width:400px;
    border-radius:10px;
    width:90%;
}

/* =========================
   ANIMATION SECTION
========================= */

#repSection {
    max-height:0;
    overflow:hidden;
    transition:0.4s;
}

#repSection.show {
    max-height:500px;
}

/* =========================
   📱 MOBILE RESPONSIVE
========================= */

@media (max-width: 768px){

    .calendar-container{
        flex-direction:column;
        gap:20px;
    }

    .calendar-wrapper{
        width:100%;
    }

    .calendar-header{
        font-size:18px;
    }

    .day,.empty{
        height:50px;
    }

    .day button{
        font-size:13px;
    }

    .weekdays,
    .calendar-grid{
        gap:5px;
    }

    .time-slots{
        min-width:100%;
        padding:12px;
    }

    .slot-card{
        flex-direction:column;
        align-items:flex-start;
        gap:8px;
    }
}

@media (max-width: 480px){

    .calendar-header{
        font-size:16px;
    }

    .day,.empty{
        height:45px;
    }

    .day button small{
        font-size:9px;
    }

    .slot-time{
        font-size:14px;
    }

    .slot-status{
        font-size:12px;
    }

    .modal-content{
        margin:20px auto;
        padding:15px;
    }
}