@import 'common-styles.css';

/* WHY: the React BootstrapInlineCalendar reuses the .datepicker classes but the
   bootstrap-datepicker base stylesheet (which centred day numbers in their circles)
   was dropped when the portal moved to React. Restore the centering here. */
.datepicker table tr td,
.datepicker table tr th {
    text-align: center;
    vertical-align: middle;
}

/* Desktop table layout */
.doctors-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 120px 200px;
    gap: 20px;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.doctors-table-cell {
    display: flex;
    align-items: center;
}

.doctors-info-cell {
    gap: 12px;
}

.doctors-languages-cell {
    justify-content: center;
}

.doctors-time-cell {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.doctors-action-cell {
    justify-content: flex-end;
}

.doctors-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.doctors-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.doctors-details {
    flex: 1;
    min-width: 0;
}

.doctors-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}


.doctors-info-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.doctors-info-btn:hover {
    color: #3d8bcc;
}

.treatment-name {
    margin-bottom: 2px;
}

.location-name {
    font-size: 12px;
}

.time {
    font-size: 18px;
    font-weight: 600;
    color: #394B5A;
    margin: 0;
}

.duration {
    font-size: 14px;
    color: #394B5A;
    margin: 0;
}

.doctors-action-section {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    justify-content: flex-end;
    min-width: fit-content;
}

.prepayment-info {
    padding: 0 10px 0 15px;
    background: white;
    border: none;
    border-radius: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.prepayment-label {
    font-size: 11px;
    font-weight: 500;
    color: #394B5A;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.prepayment-amount {
    font-size: 14px;
    font-weight: 600;
    color: #394B5A;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.doctors-action-section .btn-action {
    background-color: var(--bgBtnDark);
    color: var(--textBtnDark);
    border: none;
    border-radius: 0;
    padding: 0 20px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex: 0 0 auto;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctors-action-section .btn-action:hover {
    background-color: var(--bgBtnHover);
    color: var(--textBtnHover);
}

.doctors-languages-cell img {
    width: 20px;
    height: 20px;
}

@media (max-width: 1439px) {
    .doctors-table-row {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }

    .doctors-table-cell {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .doctors-info-cell {
        display: flex;
        flex-direction: row;
        gap: 16px;
        margin-bottom: 16px;
        align-items: flex-start;
    }

    .doctors-languages-cell {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 16px;
    }

    .doctors-languages-cell .lang-list-wrapper.d-flex {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
    }

    .doctors-time-cell {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .doctors-action-cell {
        display: flex;
        justify-content: flex-end;
    }

    .doctors-action-section {
        width: 100%;
        max-width: 300px;
    }
}


@media (max-width: 480px) {
    .doctors-table-row {
        padding: 16px;
    }

    .doctors-info-cell {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
    }

    .doctors-languages-cell {
        justify-content: center;
    }

    .doctors-time-cell {
        justify-content: center;
    }

    .doctors-action-cell {
        justify-content: center;
    }

    .doctors-action-section {
        width: 100%;
        max-width: none;
        justify-content: center;
    }
}

.mobile-card-layout {
    display: none;
}


@media (max-width: 1439px) {
    .doctors-table-row {
        display: none;
    }

    .mobile-card-layout {
        display: block !important;
        width: 500px;
        max-width: 100%;
        margin: 0 auto 12px auto;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #e9ecef;
        overflow: hidden;
    }


    .mobile-card-layout .mobile-top-section {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 20px 14px;
        background: white;
    }

    .mobile-card-layout .mobile-doctor-info {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        flex: 1;
    }

    .mobile-card-layout .mobile-languages {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-end;
        align-items: flex-start;
    }

    .mobile-card-layout .mobile-languages img {
        width: 20px;
        height: 20px;
    }

    .mobile-card-layout .mobile-bottom-section {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        background: #EFF8FF;
    }

    .mobile-card-layout .mobile-time {
        display: flex;
        /* flex-direction: column; */
        align-items: flex-start;
        gap: 8px;
    }


    .mobile-card-layout .mobile-actions {
        display: flex;
        justify-content: flex-end;
    }


}

@media (max-width: 500px) {
    .mobile-card-layout .mobile-languages {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .mobile-card-layout .mobile-languages .lang-list-wrapper.d-flex {
        flex-wrap: wrap;
        justify-content: flex-end;
        max-width: 50px;
    }

    .mobile-card-layout .doctors-action-section .btn-action {
        padding: 0 18px;
    }

    .mobile-card-layout .prepayment-info {
        padding: 0 8px 0 10px;
    }


    .time {
        font-size: 16px;
    }

    .mobile-card-layout .mobile-time {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
}

.doctor-modal-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.doctor-modal-top-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: white;
}

.doctor-modal-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex: 1;
}

.doctor-modal-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    align-items: flex-start;
}

.doctor-modal-languages img {
    width: 20px;
    height: 20px;
}

.doctor-modal-description {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.doctor-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.doctor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    color: #394B5A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.doctor-name {
    font-weight: 600;
    color: #3d8bcc;
    font-size: 16px;
    margin-bottom: 4px;
}

.doctor-clinic {
    color: #6c757d;
    font-size: 14px;
}



.doctor-data {
    align-self: center;
    flex: 1;
    min-width: 0;
}

.doctor-assistant {
    font-size: 14px;
    color: #6c757d;
    margin-top: 2px;
}

.mobile-doctor-modal-card {
    display: none;
}

@media (max-width: 1439px) {
    .doctor-modal-card {
        display: none;
    }

    .mobile-doctor-modal-card {
        display: block !important;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid #e9ecef;
        overflow: hidden;
    }

    .mobile-doctor-modal-top-section {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 20px;
        background: white;
    }

    .mobile-doctor-modal-info {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        flex: 1;
    }

    .mobile-doctor-modal-languages {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-end;
        align-items: flex-start;
    }

    .mobile-doctor-modal-languages img {
        width: 20px;
        height: 20px;
    }

    .mobile-doctor-modal-description {
        padding: 16px 20px;
        background: #f8f9fa;
        border-top: 1px solid #e9ecef;
    }
}

@media (max-width: 500px) {
    .mobile-doctor-modal-languages {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .mobile-doctor-modal-languages .lang-list-wrapper.d-flex {
        flex-wrap: wrap;
        justify-content: flex-end;
        max-width: 50px;
    }
}

.confirm-doctor-section {
    padding-top: 30px;
}

.confirm-doctor-section .mobile-doctor-modal-card {
    display: none;
}

@media (max-width: 1439px) {
    .confirm-doctor-section .confirm-visit-table-row {
        display: none;
    }
    
    .confirm-doctor-section .mobile-confirm-visit-card {
        display: block !important;
        width: 100%;
    }
}

