.booking-form-wrapper {
    max-width: 95%;
    margin: 0 auto;
    padding: 15px;
    background: rgba(249, 249, 249, 0.95);
    border-radius: 8px;
    position: relative;
    z-index: 1;
    bottom: 200px;
}

.booking-form-inline .form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.booking-form-inline .form-group {
    flex: 1;
    min-width: 120px;
    margin-bottom: 0;
}

.booking-form-inline .form-group:last-child {
    flex: 0 0 auto;
    min-width: auto;
}

.booking-form-wrapper .form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 13px;
    white-space: nowrap;
}

/* Единый стиль для всех полей ввода - исправление для iOS Safari */
.booking-form-wrapper input[type="text"],
.booking-form-wrapper input[type="tel"],
.booking-form-wrapper input[type="email"],
.booking-form-wrapper input[type="date"],
.booking-form-wrapper input[type="number"],
.booking-form-wrapper select,
.booking-form-wrapper textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px; /* Важно для iOS Safari - предотвращает зуммирование */
    min-width: 100px;
    height: 40px; /* Фиксированная высота для всех полей */
    line-height: 1.4;
    background: #fff;
    color: #333;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Специально для select на iOS */
.booking-form-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    padding-right: 35px;
    cursor: pointer;
}

/* Убираем стандартную стрелку select на iOS */
.booking-form-wrapper select::-ms-expand {
    display: none;
}

/* Стили для input type="date" на iOS */
.booking-form-wrapper input[type="date"] {
    position: relative;
    min-height: 40px;
}

/* Кастомный placeholder для date на iOS */
.booking-form-wrapper input[type="date"]:not(:focus):not(:valid) {
    color: #999;
}

.booking-form-wrapper input[type="date"]:not(:focus):not(:valid)::-webkit-datetime-edit {
    color: #999;
}

.booking-form-wrapper input[type="date"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Стили для number - убираем стрелки */
.booking-form-wrapper input[type="number"] {
    -moz-appearance: textfield;
}

.booking-form-wrapper input[type="number"]::-webkit-inner-spin-button,
.booking-form-wrapper input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.booking-submit-btn {
    background: #fab702;
    color: white;
    border: none;
    padding: 8px 25px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    height: 39px;
    line-height: 1;
}

.booking-submit-btn:hover {
    background: #e8ab05;
}

/* ============================================
   POPUP - МАКСИМАЛЬНЫЙ ПРИОРИТЕТ
   ============================================ */
#booking-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 999999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
}

#booking-popup.show {
    display: flex !important;
}

#booking-popup .popup-content {
    background: #ffffff !important;
    padding: 35px !important;
    border-radius: 12px !important;
    max-width: 520px !important;
    width: 92% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    position: relative !important;
    z-index: 9999999999 !important;
    margin: 20px auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    pointer-events: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#booking-popup .popup-close {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    font-size: 32px !important;
    cursor: pointer !important;
    color: #999 !important;
    z-index: 10 !important;
    background: none !important;
    border: none !important;
    line-height: 1 !important;
    padding: 5px 10px !important;
    pointer-events: auto !important;
    font-weight: 300 !important;
}

#booking-popup .popup-close:hover {
    color: #333 !important;
    transform: scale(1.1);
}

#booking-popup h2 {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    color: #333 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
}

#booking-popup .form-group {
    margin-bottom: 15px !important;
}

#booking-popup label {
    display: block !important;
    font-weight: bold !important;
    margin-bottom: 5px !important;
    color: #333 !important;
    font-size: 14px !important;
}

#booking-popup input[type="text"],
#booking-popup input[type="tel"],
#booking-popup input[type="email"],
#booking-popup textarea {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    font-size: 15px !important;
    background: #fafafa !important;
    transition: border-color 0.3s ease !important;
}

#booking-popup input[type="text"]:focus,
#booking-popup input[type="tel"]:focus,
#booking-popup input[type="email"]:focus,
#booking-popup textarea:focus {
    border-color: #0073aa !important;
    outline: none !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1) !important;
}

#booking-popup textarea {
    resize: vertical !important;
    min-height: 80px !important;
}

#booking-popup .booking-submit-btn {
    width: 100% !important;
    height: auto !important;
    padding: 14px !important;
    font-size: 17px !important;
    margin-top: 5px !important;
    border-radius: 6px !important;
}

/* Блокировка скролла body */
body.booking-popup-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

/* Для старых браузеров */
#booking-popup {
    _position: absolute !important;
    _top: expression(0+((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+'px') !important;
    _left: expression(0+((e=document.documentElement.scrollLeft)?e:document.body.scrollLeft)+'px') !important;
    _width: expression(document.documentElement.clientWidth+'px') !important;
    _height: expression(document.documentElement.clientHeight+'px') !important;
}

/* Адаптация для мобильных устройств */
@media screen and (max-width: 768px) {
    .booking-form-wrapper {
        bottom: 0;
    }
    .booking-form-inline .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .booking-form-inline .form-group {
        min-width: 100%;
        margin-bottom: 10px;
    }
    
    .booking-form-inline .form-group:last-child {
        flex: 1;
    }
    
    .booking-submit-btn {
        width: 100%;
        height: auto;
        padding: 12px;
    }
    
    #booking-popup .popup-content {
        width: 96% !important;
        padding: 20px !important;
        margin: 10px !important;
        max-height: 90vh !important;
    }
    
    #booking-popup .popup-close {
        font-size: 28px !important;
        top: 8px !important;
        right: 12px !important;
    }
    
    #booking-popup h2 {
        font-size: 20px !important;
    }
}

/* Для очень маленьких экранов */
@media screen and (max-width: 400px) {
    #booking-popup .popup-content {
        padding: 15px !important;
        width: 98% !important;
    }
    
    #booking-popup input[type="text"],
    #booking-popup input[type="tel"],
    #booking-popup input[type="email"] {
        font-size: 16px !important; /* Предотвращает зуминг на iOS */
    }
}



/* Специальные стили для iOS Safari */
@supports (-webkit-touch-callout: none) {
    .booking-form-wrapper input[type="date"],
    .booking-form-wrapper input[type="number"],
    .booking-form-wrapper select {
        font-size: 16px !important;
        height: 44px !important;
        padding: 8px 14px !important;
    }
    
    .booking-form-wrapper input[type="date"] {
        min-height: 44px;
    }
    
    .booking-submit-btn {
        height: 44px;
        padding: 8px 25px;
    }
}