/* Enhanced Booking Modal Styles with Premium Aesthetics */
:root {
    --primary: rgb(209,158,66);
    --primary-light: #f0c8a1;
    --primary-dark: #af8a65;
    --primary-subtle: #fdf4ff;
    --text-dark: #2d3748;
    --text-medium: #4a5568;
    --text-light: #718096;
    --white: #ffffff;
    --background: #f8fafc;
    --border: #e2e8f0;
    --border-light: #edf2f7;
    --success: #38b2ac;
    --error: #e53e3e;
    --unavailable: #f0f0f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease;
}

/* Base Modal Structure */
.booking-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    padding: 16px;
    box-sizing: border-box;
    transition: opacity 0.25s ease;
}

.booking-modal.fade-in {
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.booking-container {
    background-color: var(--white);
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    min-height: 600px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
    overflow: hidden; /* Prevent scroll from affecting container shape */
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Create a scrollable inner container that preserves the shape */
.booking-scrollable {
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.booking-step-content.active {
    /* overflow-y: scroll; */
    max-height: 474px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.booking-scrollable::-webkit-scrollbar {
    width: 4px;
}

.booking-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.booking-scrollable::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.1);
    border-radius: 10px;
}

/* Header */
.booking-header {
    background-color: var(--primary);
    padding: 16px 20px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    position: relative;
}

.booking-title {
    font-size: 20px;
    color: var(--white);
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0.85;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
    transform: rotate(90deg);
}

/* Progress Steps */
.booking-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 10px 16px;
}

.progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    font-size: 14px;
}

.progress-step.active {
    background-color: var(--primary);
    color: white;
}

.progress-step.completed {
    background-color: var(--primary-light);
    color: white;
}

.progress-bar {
    height: 3px;
    background-color: var(--border);
    flex-grow: 1;
    margin: 0 5px;
    position: relative;
    z-index: 0;
    transition: all 0.4s ease;
}

.progress-bar.active {
    background-color: var(--primary-light);
}

/* Booking Step Content */
.booking-step-content {
    display: none;
    padding: 20px;
    height: 470px;
    overflow-y: visible;
}

.booking-step-content.active {
    display: block;
    animation: fadeInContent 0.4s ease-out;
}

@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 17px;
    margin: 0 0 20px;
    color: var(--text-dark);
    text-align: center;
    font-weight: 600;
}

/* Service Selection */
.service-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 18px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.service-categories::-webkit-scrollbar {
    display: none;
}

.category-btn {
    background-color: var(--background);
    border: 1px solid var(--border);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-medium);
    font-weight: 500;
}

.category-btn:hover {
    border-color: var(--primary-light);
    background-color: var(--primary-subtle);
    color: var(--primary);
}

.category-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(82, 113, 226, 0.25);
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 330px;
    overflow-y: auto;
    padding-right: 8px;
    padding-top: 5px;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.service-list::-webkit-scrollbar {
    width: 5px;
}

.service-list::-webkit-scrollbar-track {
    background: transparent;
}

.service-list::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 10px;
}

.service-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--white);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.service-item:hover {
    border-color: var(--primary-light);
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.service-checkbox {
    margin-right: 15px;
}

.service-input {
    display: none;
}

.service-label {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.service-input:checked + .service-label {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(82, 113, 226, 0.2);
}

.service-input:checked + .service-label::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

.service-details {
    flex: 1;
}

.service-details h5 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.service-meta {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: var(--text-light);
}

.service-price {
    font-weight: 600;
    color: var(--primary);
}

/* Specialist Selection */
.specialists-container {
    margin-bottom: 20px;
}

.specialist-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.specialist-list::-webkit-scrollbar {
    display: none;
}

.specialist-item {
    min-width: 100px;
    border-radius: 10px;
    padding: 12px;
    background-color: var(--white);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.specialist-item:hover {
    border-color: var(--primary-light);
}

.specialist-item.active {
    border: 2px solid var(--primary);
}

.specialist-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
    border: 2px solid #f0f0f0;
    background-color: #f0f0f0;
}

.specialist-item.active .specialist-avatar {
    border-color: var(--primary);
}

.specialist-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.specialist-info h5 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.specialist-rating {
    color: #ffc107;
    font-size: 12px;
    margin-bottom: 3px;
}

.specialist-info p {
    margin: 0;
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.3;
}

/* Date Selection */
.date-selection {
    background-color: var(--white);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.month-nav-btn {
    background-color: var(--white);
    border: 1px solid var(--border);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
    font-size: 14px;
}

.month-nav-btn:hover {
    background-color: var(--primary-subtle);
    border-color: var(--primary-light);
    color: var(--primary);
}

.current-month {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 10px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    background-color: #f9f9f9;
    color: var(--text-dark);
}

.calendar-day:hover:not(.disabled) {
    background-color: #f0f0f0;
}

.calendar-day.active {
    background-color: var(--primary);
    color: white;
}

.calendar-day.disabled {
    color: #d1d5db;
    background-color: var(--border-light);
    cursor: not-allowed;
    border-color: transparent;
}

.calendar-day.today {
    border: 2px solid var(--primary-light);
    font-weight: 600;
}

/* Time Slots */
.time-slots {
    margin-top: 20px;
}

.time-slots h5 {
    margin: 12px 0 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.time-slots-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.time-slot {
    background-color: var(--white);
    border: 1px solid #f0f0f0;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
    position: relative;
    min-width: 60px;
    text-align: center;
}

.time-slot:hover:not(.unavailable) {
    border-color: var(--primary);
    background-color: var(--primary-subtle);
}



.time-slot.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.time-slot.unavailable {
    background-color: var(--unavailable);
    color: #aaa;
    cursor: not-allowed;
    position: relative;
    border-color: #e0e0e0;
}

/* Diagonal striped pattern for unavailable slots */
.time-slot.unavailable::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.05) 3px,
        rgba(0,0,0,0.05) 6px
    );
    z-index: 0;
}

/* Red diagonal line through unavailable slots */
.time-slot.unavailable::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
        45deg,
        transparent 40%,
        rgba(220, 38, 38, 0.2) 45%,
        rgba(220, 38, 38, 0.2) 55%,
        transparent 60%
    );
    z-index: 1;
}

/* Ensure text is above the patterns */
.time-slot span {
    position: relative;
    z-index: 2;
}


/* Contact Form */
.contact-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background-color: var(--white);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(82, 113, 226, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.phone-input-container {
    display: flex;
    align-items: center;
}

.phone-prefix {
    padding: 12px 14px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.phone-input-container input {
    border-radius: 0 8px 8px 0;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.selected-services-summary {
    font-size: 14px;
    color: var(--text-light);
    align-self: center;
}

.selected-count {
    font-weight: 600;
    color: var(--primary);
}

.next-step-btn, .confirm-booking-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.next-step-btn:hover, .confirm-booking-btn:hover {
    background-color: var(--primary-dark);
}

.next-step-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.back-step-btn {
    background-color: var(--white);
    color: var(--text-medium);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.back-step-btn:hover {
    background-color: var(--background);
    border-color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Booking Summary */
.booking-summary {
    background-color: var(--background);
    border-radius: 12px;
    padding: 18px;
    margin-top: 24px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.booking-summary h4 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.summary-label {
    color: var(--text-light);
}

.summary-value {
    font-weight: 500;
    color: var(--text-dark);
}

.summary-price {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px dashed var(--border);
    font-size: 16px;
    font-weight: 600;
}

.price {
    color: var(--primary);
    font-weight: 700;
}

/* Confirmation Screen */
.confirmation-content {
    text-align: center;
    padding: 24px 0;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    background-color: var(--success);
    background-image: linear-gradient(135deg, var(--success), #319795);
    color: white;
    font-size: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 6px 15px rgba(56, 178, 172, 0.3);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.confirmation-content h4 {
    font-size: 22px;
    margin: 0 0 14px;
    color: var(--success);
    font-weight: 700;
}

.confirmation-content p {
    margin: 0 0 10px;
    color: var(--text-medium);
    font-size: 15px;
}

.appointment-details {
    background-color: var(--background);
    border-radius: 12px;
    padding: 18px;
    margin: 24px 0;
    text-align: left;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.appointment-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.appointment-label {
    color: var(--text-light);
}

.appointment-value {
    font-weight: 500;
    color: var(--text-dark);
}

.close-confirmation-btn {
    background-color: var(--success);
    background-image: linear-gradient(135deg, var(--success), #319795);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    box-shadow: 0 3px 10px rgba(56, 178, 172, 0.25);
    font-size: 15px;
}

.close-confirmation-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(56, 178, 172, 0.35);
}

.service-meta a {
    color: #424141;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.confirm-booking-btn {
    opacity: 1;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 480px) {
    .booking-container {
        max-height: 90vh;
    }
    
    .booking-header {
        padding: 16px 20px;
    }
    
    .booking-title {
        font-size: 18px;
    }
    
    .booking-step-content {
        padding: 18px;
    }
    
    .service-item, 
    .specialist-item {
        padding: 12px;
    }
    
    .specialist-avatar {
        width: 60px;
        height: 60px;
    }
    
    .service-details h5 {
        font-size: 14px;
    }
    
    .step-navigation {
        gap: 12px;
    }
    
    .selected-services-summary {
        width: 100%;
        order: -1;
        margin-bottom: 10px;
    }
    
    .next-step-btn, 
    .back-step-btn, 
    .confirm-booking-btn {
        padding: 9px 16px;
        font-size: 13px;
    }
}





/* Стили для промокода */
.promo-input-container {
    display: flex;
    margin-bottom: 10px;
}

.promo-input-container input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.promo-input-container button {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.promo-input-container button:hover {
    background-color: var(--primary-dark);
}

.promo-message {
    font-size: 13px;
    margin-top: 5px;
    min-height: 18px;
}

.promo-message.error {
    color: var(--error);
}

.promo-message.success {
    color: var(--success);
}

/* Стили для отображения скидки в сводке */
.summary-discount {
    border-top: 1px dashed #e0e0e0;
    margin-top: 10px;
    padding-top: 10px;
}

.discount-row {
    color: var(--success);
}

.discount-name {
    font-size: 13px;
    font-style: italic;
    margin-right: 5px;
}

.discount-amount {
    font-weight: 600;
}

.auto-discount-notification {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-left: 3px solid var(--success);
    padding: 8px 12px;
    margin-top: 15px;
    font-size: 13px;
    border-radius: 0 4px 4px 0;
}

.discount-icon {
    background-color: var(--success);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-weight: bold;
    margin-right: 8px;
    font-size: 12px;
}

.step-conter {
    height: 330px;
    overflow-y: scroll;
    padding-right: 5px;
}

/* Анимация при применении скидки */
@keyframes discount-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.discount-animation {
    animation: discount-pulse 0.5s ease-in-out;
}




.contact-form .service-details {
    flex: 50% !important;
}