/* Стили для модуля mod_feedbackform - Дизайн формы бронирования */

.custom-form {
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}




.custom-form > * {
    position: relative;
    z-index: 1;
}

/* Сетка для полей */
.custom-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.custom-form .form-row-triple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.custom-form .form-group {
    margin-bottom: 0;
    position: relative;
}

.custom-form label {
    display: none; /* Скрываем лейблы, используем только placeholder */
}

.custom-form .form-control {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 2px;
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    min-height: 56px;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.custom-form .form-control::placeholder {
    color: #fff;
    font-weight: 400;
    font-style: normal;
}

.custom-form .form-control:focus {
    outline: none;
    color:#fff;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.custom-form .form-control:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(0, 0, 0, 0.35);
}

/* Специальные стили для выпадающих списков */
.custom-form select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23a8c8c8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
    cursor: pointer;
}

/* Стили для выпадающего списка (options) */
.custom-form select.form-control option {
    background-color: #fff !important;
    color: #000 !important;
    padding: 10px 15px;
    font-size: 16px;
}

.custom-form select.form-control option:hover,
.custom-form select.form-control option:checked,
.custom-form select.form-control option:focus {
    background-color: #f0f0f0 !important;
    color: #000 !important;
}

.custom-form input[type="date"],
.custom-form input[type="time"] {
    position: relative;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.custom-form input[type="date"]::-webkit-calendar-picker-indicator,
.custom-form input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a8c8c8;
    background: none;
    border: none;
    font-size: 16px;
    width: 20px;
    height: 20px;
}

/* Стили для иконок в полях */
.custom-form .form-control {
    position: relative;
}

.custom-form .form-control::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Иконка человека для поля количества - используем контейнер */
.custom-form .form-group:has(select[name="guests"])::before {
    content: '👤';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #a8c8c8;
    pointer-events: none;
    z-index: 2;
}

/* Иконка календаря для поля даты - используем контейнер */
.custom-form .form-group:has(input[type="date"])::before {
    content: '📅';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #a8c8c8;
    pointer-events: none;
    z-index: 2;
}

/* Иконка часов для поля времени - используем контейнер */
.custom-form .form-group:has(select[name="time"])::before {
    content: '🕐';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #a8c8c8;
    pointer-events: none;
    z-index: 2;
}

/* Отступы для полей с иконками */
.custom-form select[name="guests"] {
    padding-left: 50px;
}

.custom-form input[name="guests"] {
    padding-left: 50px;
}

.custom-form input[type="date"] {
    padding-left: 50px;
    cursor: pointer;
}

.custom-form select[name="time"] {
    padding-left: 50px;
}

.custom-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
    grid-column: 1 / -1;
}


/* Контейнер для формы и результата */
.feedback-container {
    position: relative;
}

/* Стили для автодополнения (убираем фон при выборе из списка) */
input[type="tel"]:-webkit-autofill,
input[type="tel"]:-webkit-autofill:hover,
input[type="tel"]:-webkit-autofill:focus,
input[type="tel"]:-webkit-autofill:active,
input[name="phone"]:-webkit-autofill,
input[name="phone"]:-webkit-autofill:hover,
input[name="phone"]:-webkit-autofill:focus,
input[name="phone"]:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: #fff !important;
    background-color: transparent !important;
    color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Убираем синий outline у поля даты */
input[type="date"],
input[type="date"]:focus,
input[type="date"]:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Убираем синее выделение текста в поле даты */
input[type="date"]::selection,
input[type="date"]::-webkit-selection {
    background: transparent !important;
    color: inherit !important;
}

input[type="date"]::-moz-selection {
    background: transparent !important;
    color: inherit !important;
}

/* Убираем highlight у внутренних элементов даты */
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    background: transparent !important;
    color: inherit !important;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper::selection,
input[type="date"]::-webkit-datetime-edit-month-field::selection,
input[type="date"]::-webkit-datetime-edit-day-field::selection,
input[type="date"]::-webkit-datetime-edit-year-field::selection {
    background: transparent !important;
}

/* Убираем синюю обводку у календаря */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.7;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Стили для сообщений */
.feedback-result {
    display: none; /* Скрыт по умолчанию */
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;

}

.feedback-result .success-message {
    color: #155724;
    background-color: #fff;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 8px;
    min-height: 50px;
    display: block;
}

.feedback-result .error-message {
    color: #721c24;
    background-color: rgba(248, 215, 218, 0.9);
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    min-height: 50px;
    display: block;
}

.feedback-result .info-message {
    color: #0c5460;
    background-color: rgba(209, 236, 241, 0.9);
    border: 1px solid #bee5eb;
}

/* Анимация загрузки */
.custom-form .sppb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.custom-form .sppb-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .custom-form {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .custom-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .custom-form .form-row-triple {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .custom-form .form-control {
        padding: 14px 16px;
        font-size: 16px; /* Предотвращает зум на iOS */
    }
    
    .custom-form .sppb-btn {
        padding: 16px 25px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .custom-form {
        padding: 25px 15px;
        margin: 10px;
    }
    
    .custom-form .form-group {
        margin-bottom: 15px;
    }
    
    .custom-form .sppb-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Стили для скрытых полей */
.custom-form input[type="hidden"] {
    display: none;
}

/* Стили для полей с ошибками */
.custom-form .form-control.error {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Стили для успешной отправки */
.custom-form.success .form-control {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}




/* Дополнительные эффекты */
.custom-form .form-control:valid {
    border-color: rgba(255, 255, 255, 0.20);;
    
}

