.appointment-main {
    padding-top: var(--header-height, 176px);
}

.appointment-doctor-avatar img,
.appointment-small-avatar img {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.appointment-doctor-avatar > span,
.appointment-small-avatar > span {
    position: relative;
    z-index: 1;
}

/* Appointment doctor list mirrors the original Node.js layout. */
.appointment-groups {
    gap: 0;
}

.appointment-department-group {
    overflow: visible;
    margin-bottom: 28px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.appointment-panel h3.appointment-department-title {
    margin: 0 0 8px;
    padding: 12px 18px;
    border-radius: 8px;
    background: linear-gradient(90deg, #040738, #008ddb);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1.45;
    text-transform: uppercase;
}

.appointment-doctor-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 13px;
    padding: 0;
    background: transparent;
}

.appointment-doctor-row {
    width: 100%;
    height: 89px;
    padding: 0 21px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(4, 7, 56, .01);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.appointment-doctor-row:hover {
    background: #fff;
    border-color: #008ddb;
    box-shadow: 0 6px 15px rgba(0, 141, 219, .06);
    transform: translateY(-2px);
}

.appointment-doctor-left {
    gap: 16px;
}

.appointment-doctor-avatar {
    flex-basis: 55px;
    width: 55px;
    height: 55px;
    border: 2px solid #fff;
    background: linear-gradient(135deg, #e2f1ff, #cde6ff);
    box-shadow: 0 2px 8px rgba(0, 141, 219, .08);
    color: #008ddb;
}

.appointment-doctor-info {
    gap: 2px;
}

.appointment-doctor-title {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.appointment-doctor-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.appointment-doctor-arrow {
    transition: color .2s ease, transform .2s ease;
}

.appointment-doctor-row:hover .appointment-doctor-arrow {
    color: #008ddb;
    transform: translateX(4px);
}

/* Keep the selected date and its available hours visible together. */
.appointment-date-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(58px, 1fr));
    gap: 10px;
    overflow: visible;
    padding: 2px;
}

.appointment-date-button {
    min-width: 0;
}

.appointment-date-button:disabled {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #b6bec9;
    cursor: not-allowed;
    opacity: .62;
}

.appointment-date-button:disabled b {
    color: #a8b0bc;
}

@media (min-width: 901px) {
    #booking-step {
        display: grid;
        grid-template-columns: minmax(280px, .85fr) minmax(340px, 1.15fr);
        column-gap: 28px;
        align-items: start;
    }

    #booking-step > .appointment-step-header,
    #booking-step > .appointment-confirm {
        grid-column: 1 / -1;
    }

    #booking-step > .appointment-form-section {
        min-width: 0;
    }

    #booking-step #slot-section {
        padding-left: 28px;
        border-left: 1px solid #e2e8f0;
    }
}

@media (max-width: 720px) {
    .appointment-doctor-list {
        grid-template-columns: 1fr;
    }
}
