:root {
    --primary: #d2b17f;
    --primary-dark: #d2b17f;
    --secondary: #3caea3;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --border: #dee2e6;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
}

.booking-container {
    max-width: 1200px;
    margin: 0 auto;
}

.booking-widget {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
}

.widget-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 20px 25px;
    position: relative;
}

.widget-header h2 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.widget-header h2 i {
    font-size: 1.8rem;
}

.widget-body {
    padding: 10px;
}

.step-container {
    display: none;
}

.step-container.active {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;

    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Календарь */
.calendar-section {
    background-color: var(--light);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap: 4px;
}

.calendar-header h5 {
    font-size: 13px;
    font-weight: 600;
}    

.month-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding-left: 12px;
}

.nav-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.nav-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.current-month {
    font-size: 1.2rem;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
    color: var(--dark);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.calendar-day {
    font-weight: 600;
    padding: 12px 0;
    color: var(--dark);
    font-size: 0.8rem;
}

.calendar-date {
    padding: 14px 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.calendar-date:hover {
    background-color: rgba(44, 111, 187, 0.1);
}

.calendar-date.selected {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.calendar-date.today::before {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    z-index: 2;
}

.calendar-date.disabled {
    color: #ced4da;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* Плашки времени */
.timeslots-section {
    margin-top: 2px;
}

.timeslots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap: 5px;
}

.timeslots-header h5 {
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.selected-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    background: #e6f0ff;
    padding: 8px 15px;
    border-radius: 20px;
}

.timeslot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.timeslot {
    border-radius: 12px;
    border: 2px solid var(--border);
    padding: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 70px;
}

.timeslot:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.timeslot.selected {
    border-color: var(--primary);
    background-color: rgba(44, 111, 187, 0.08);
}

.timeslot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.timeslot.disabled:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
}

.time-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.price-display {
    font-size: 0.95rem;
    line-height: 0.95rem;
    color: var(--gray);
}

.price-display small {
    font-size: 0.65rem;
}

.timeslot.selected .price-display {
    color: var(--primary);
    font-weight: 600;
}

.checkmark {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    z-index: 10;
}

.timeslot.selected .checkmark {
    opacity: 1;
    transform: scale(1);
}

/* Корзина */
.cart-section {
    background-color: var(--light);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.cart-header {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.3s;
    position: relative;
}

.cart-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-date {
    font-weight: 600;
    color: var(--dark);
}

.cart-item-time {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
}

.cart-item-price {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.1rem;
}

.remove-item {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
}

.cart-item:hover .remove-item {
    opacity: 1;
}

.cart-total {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: right;
    padding: 25px 15px 15px;
    color: var(--dark);
    border-top: 2px solid var(--border);
    margin-top: 15px;
}

.total-label {
    color: var(--gray);
    margin-right: 15px;
}

/* Форма данных */
.customer-form {
    margin-top: 30px;
    background: var(--light);
    border-radius: 12px;
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 111, 187, 0.25);
    outline: none;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.error-message {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

/* Кнопки */
.btn-booking {
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-next {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-next:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(44, 111, 187, 0.4);
}

.btn-pay {
    background: linear-gradient(135deg, var(--success), #1e7e34);
    color: white;
}

.btn-pay:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(40, 167, 69, 0.4);
}

.btn-back {
    background-color: white;
    color: var(--dark);
    border: 1px solid var(--border);
}

.btn-back:hover {
    background-color: var(--light);
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding: 0 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-booking-group {
    display: flex;
    gap: 15px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .timeslot-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .widget-body {
        padding: 20px 15px;
    }
    
    .calendar-grid {
        gap: 5px;
    }
    
    .calendar-date {
        padding: 10px 0;
        font-size: 0.9rem;
    }
    
    .timeslot-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .time-display {
        font-size: 1.0rem;
    }
    
    .btn-booking {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .customer-form .form-row {
        flex-direction: column;
    }
    
    .customer-form .form-row .col {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .timeslot-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .timeslot {
        padding: 14px 5px;
        min-height: 80px;
    }

    .calendar-section {
        margin: 0 0 25px 0;
    }    
    
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .month-navigation {
        align-self: center;
    }
    
    .button-container {
        flex-direction: column;
    }
    
    .btn-booking-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-booking {
        flex: 1;
    }
}

/* Иконка загрузки */
.loading-section {
    display: none;
    text-align: center;
    padding: 50px 20px;
}

.spinner {
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Сообщение об успехе */
.success-section {
    text-align: center;
    padding: 50px 20px;
    display: none;
}

.success-icon {
    font-size: 70px;
    color: var(--success);
    margin-bottom: 25px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-section h3 {
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 700;
}

.success-section p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Индикатор загрузки слотов */
.timeslot-loading {
    text-align: center;
    padding: 30px;
    display: none;
}

.timeslot-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Сообщения об ошибках */
.error-container {
    color: var(--danger);
    font-size: 0.95rem;
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    display: none;
}