.is-hidden {
    display: none;
}

.doctor-age-icon {
    vertical-align: middle;
    margin-right: 4px;
}

.doctor-detail-wrapper {
    display: flex;
    gap: 0;
    margin: 20px 0;
    width: 100%;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    align-items: stretch;
}

.doctor-detail-content {
    background-color: #fff;
    margin: 0;
    padding: 0;
    border-radius: 12px 0 0 12px;
    width: 60%;
    overflow: hidden;
    order: 1;
}

.doctor-detail-appointment-panel {
    width: 40%;
    flex-shrink: 0;
    background-color: #fff;
    border-radius: 0 12px 12px 0;
    padding: 20px;
    border-left: 1px solid #e0e0e0;
    order: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.doctor-detail-appointment-title {
    font-size: 18px;
    font-weight: bold;
    color: #041520;
    margin-bottom: 20px;
    text-align: center;
}

.doctor-detail-appointment-submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #1BA1F2;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.doctor-detail-appointment-submit-btn:hover {
    background-color: #4DC160;
}

.doctor-detail-header {
    display: flex;
    padding: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
}

.doctor-detail-photo {
    width: 120px;
    height: 150px;
    border-radius: 8px;
    object-fit: contain;
    object-position: center;
    margin-right: 20px;
    margin-top: -10px;
    flex-shrink: 0;
    background: #f5f5f5;
}

.doctor-detail-info {
    flex: 1;
}

.doctor-detail-name {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    padding: 8px 15px;
    background-color: #1BA1F2;
    border-radius: 5px;
    display: inline-block;
}

.doctor-detail-position {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.doctor-detail-experience {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.doctor-detail-patient-age {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.doctor-detail-patient-age .doctor-age-icon {
    color: #1BA1F2;
}

.doctor-detail-next-appointment {
    font-size: 14px;
    color: #041520;
    margin-bottom: 8px;
}

.next-appointment-label {
    font-weight: 600;
    color: #041520;
}

.next-appointment-value {
    color: #1BA1F2;
    font-weight: 600;
}

.next-appointment-loading {
    color: #888;
    font-style: italic;
}

.doctor-detail-body {
    padding: 0 30px 30px 30px;
}

.doctor-detail-section {
    margin-bottom: 25px;
}

.doctor-detail-section h3 {
    font-size: 18px;
    color: #041520;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1BA1F2;
}

.doctor-education,
.doctor-accreditation {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doctor-education li,
.doctor-accreditation li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.6;
}

.doctor-education li:last-child,
.doctor-accreditation li:last-child {
    border-bottom: none;
}

.doctor-education li strong,
.doctor-accreditation li strong {
    color: #1BA1F2;
    margin-right: 8px;
}

@media (max-width: 1024px) {
    .doctor-detail-wrapper {
        flex-direction: column;
    }
    
    .doctor-detail-content {
        width: 100%;
    }
    
    .doctor-detail-content {
        width: 100%;
        border-radius: 12px 12px 0 0;
        order: 1;
    }
    
    .doctor-detail-appointment-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        border-radius: 0 0 12px 12px;
        order: 2;
    }
}

@media (max-width: 768px) {
    .doctor-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .doctor-detail-photo {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Форма записи на прием */
.appointment-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.appointment-error {
    padding: 15px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.appointment-services {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.appointment-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #041520;
    margin-bottom: 12px;
}

/* Карточки услуг */
.appointment-services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    min-height: 0;
}

.appointment-service-card {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.appointment-service-card:hover {
    border-color: #1BA1F2;
    background: #f0f8ff;
}

.appointment-service-card.selected {
    border-color: #1BA1F2;
    background: #e3f2fd;
}

.appointment-service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.appointment-service-name {
    font-size: 15px;
    font-weight: 600;
    color: #041520;
    flex: 1;
    margin-right: 10px;
}

.appointment-service-price {
    font-size: 16px;
    font-weight: 600;
    color: #1BA1F2;
    white-space: nowrap;
}

.appointment-service-info {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.appointment-service-duration {
    color: #666;
}

.appointment-service-slots {
    color: #1BA1F2;
    font-weight: 500;
}

/* Раскрывающиеся секции дат */
.appointment-dates-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.appointment-date-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.appointment-date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.appointment-date-header:hover {
    background-color: #f5f5f5;
}

.appointment-date-title {
    font-size: 15px;
    font-weight: 600;
    color: #041520;
}

.appointment-date-arrow {
    font-size: 18px;
    color: #666;
    transition: transform 0.3s ease;
}

.appointment-date-section.expanded .appointment-date-arrow {
    transform: rotate(180deg);
}

.appointment-date-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 15px;
}

.appointment-date-section.expanded .appointment-date-content {
    max-height: 500px;
    padding: 15px;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

.appointment-times-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
}

.appointment-time-item {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.appointment-time-item:hover {
    border-color: #1BA1F2;
    color: #1BA1F2;
    background-color: #f0f8ff;
}

.appointment-time-item.selected {
    background-color: #1BA1F2;
    border-color: #1BA1F2;
    color: #fff;
}

.appointment-time-item-wrapper {
    display: inline-block;
    position: relative;
    margin-right: 8px;
    margin-bottom: 8px;
}

.appointment-submit-btn-inline {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 10px;
    padding: 12px 24px;
    background-color: #4DC160;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(77, 193, 96, 0.4), 0 2px 6px rgba(0,0,0,0.15);
}

.appointment-submit-btn-inline:hover {
    background-color: #45b055;
    box-shadow: 0 6px 16px rgba(77, 193, 96, 0.5), 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.appointment-submit-btn-inline:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(77, 193, 96, 0.4), 0 1px 4px rgba(0,0,0,0.15);
}

.appointment-time-item-wrapper .appointment-time-item.selected ~ .appointment-submit-btn-inline {
    display: inline-block;
}

.appointment-service-card.hidden {
    display: none;
}

.appointment-date-section.hidden {
    display: none;
}

/* Модальное окно для формы записи */
.appointment-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.appointment-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.appointment-modal-content {
    background-color: #fff;
    padding: 20px 25px;
    border-radius: 12px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.appointment-modal.active .appointment-modal-content {
    transform: scale(1);
}

.appointment-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.appointment-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.appointment-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #041520;
    margin-bottom: 10px;
    padding-right: 30px;
    width: 100%;
    box-sizing: border-box;
}

.appointment-modal-info {
    padding: 12px 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.appointment-modal-info-photo {
    flex-shrink: 0;
    width: 80px;
    height: 100px;
}

.appointment-modal-info-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 6px;
    transform: scaleX(-1);
}

.appointment-modal-info-text {
    flex: 1;
    min-width: 0;
}

.appointment-modal-doctor {
    color: #041520;
    font-weight: 600;
    margin-bottom: 3px;
}

.appointment-modal-doctor-position {
    color: #666;
    font-size: 13px;
    margin-bottom: 2px;
}

.appointment-modal-doctor-experience {
    color: #888;
    font-size: 13px;
    margin-bottom: 2px;
}

.appointment-modal-doctor-patient-age {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.appointment-modal-doctor-patient-age .doctor-age-icon {
    color: #1BA1F2;
}

.appointment-modal-datetime {
    color: #1BA1F2;
    font-weight: 500;
    padding-top: 6px;
    margin-top: 4px;
    border-top: 1px solid #e0e0e0;
    margin-bottom: 4px;
}

.appointment-modal-service {
    color: #041520;
    font-size: 13px;
    margin-top: 4px;
    margin-bottom: 2px;
}

.appointment-modal-service-price {
    color: #1BA1F2;
    font-weight: 600;
    font-size: 14px;
    margin-top: 2px;
}

.appointment-form-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.appointment-form-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-top: 9px;
}

.appointment-form-row {
    display: flex;
    gap: 10px;
}

.appointment-form-row .appointment-form-group {
    flex: 1;
}

.appointment-form-label {
    font-size: 14px;
    font-weight: 500;
    color: #041520;
    margin: 0;
    display: inline-block;
    width: auto;
    max-width: 100%;
    line-height: 1.2;
    position: absolute;
    top: 0;
    left: 10px;
    z-index: 1;
    background: #fff;
    padding: 0 6px;
    pointer-events: none;
}

.appointment-form-label .required-star {
    color: #d32f2f;
    margin-left: 2px;
}

.appointment-form-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    margin-top: 0;
    margin-bottom: 0;
    height: auto;
    min-height: 38px;
    min-width: 0;
}

.appointment-form-input:focus {
    outline: none;
    border-color: #1BA1F2;
    box-shadow: 0 0 0 2px rgba(27, 161, 242, 0.1);
}

.appointment-form-input.empty {
    border-color: #d32f2f;
}

.appointment-form-submit {
    width: 100%;
    padding: 12px 20px;
    background-color: #1BA1F2;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.appointment-form-submit:hover:not(:disabled) {
    background-color: #4DC160;
}

.appointment-form-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.appointment-form-note {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

.appointment-age-reminder {
    margin-top: 7px;
    padding: 9px 10px;
    border: 1px solid #1BA1F2;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.35;
}

.appointment-age-reminder.is-invalid {
    border-color: #d32f2f;
    color: #d32f2f;
    background: #fff6f6;
}

.appointment-no-services {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 10px;
}
