/* ================================================================
   Edelweiss Booking — Frontend Styles
   Compatible with Woodmart theme
   ================================================================ */

.eb-booking-widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 30px;
    font-family: inherit;
    max-width: 700px;
    margin: 0 auto;
}

/* Заголовок */
.eb-booking-header {
    text-align: center;
    margin-bottom: 24px;
}
.eb-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #1a1a2e;
}

/* Табы */
.eb-tabs {
    display: flex;
    gap: 4px;
    background: #f0f0f1;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}
.eb-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}
.eb-tab:hover {
    color: #333;
    background: rgba(255,255,255,0.5);
}
.eb-tab.active {
    background: #fff;
    color: #1a1a2e;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Поля формы */
.eb-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.eb-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.eb-field label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.eb-field select,
.eb-field input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.eb-field select:focus,
.eb-field input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34,113,177,0.15);
    background: #fff;
}

/* Два поля в ряд (даты) */
.eb-field-dates {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}
.eb-field-dates .eb-field,
.eb-field-dates {
    flex: 1;
    min-width: 200px;
}

/* Время — два поля в ряд */
.eb-field-time {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

/* Подсказка max guests */
.eb-max-guests-hint {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* Блок цены */
.eb-price-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 8px;
    color: #fff;
    margin-top: 8px;
}
.eb-price-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.eb-price-value {
    font-size: 28px;
    font-weight: 800;
}

/* Контактные данные */
.eb-contact-block {
    padding-top: 16px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.eb-contact-block .eb-field {
    flex: 1;
    min-width: 180px;
}

/* Кнопка отправки */
.eb-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e63946, #d62828);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.eb-submit-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}
.eb-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}
.eb-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.eb-submit-btn.loading {
    position: relative;
    color: transparent;
}
.eb-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: eb-spin 0.6s linear infinite;
}

@keyframes eb-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Сообщение */
.eb-message {
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}
.eb-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.eb-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Доступность — недоступно */
.eb-unavailable-hint {
    font-size: 13px;
    color: #d62828;
    font-weight: 600;
    margin-top: 4px;
}

/* Адаптивность */
@media (max-width: 600px) {
    .eb-booking-widget {
        padding: 20px;
        border-radius: 8px;
    }
    .eb-title {
        font-size: 20px;
    }
    .eb-tabs {
        flex-direction: column;
    }
    .eb-price-value {
        font-size: 22px;
    }
    .eb-contact-block .eb-field {
        min-width: 100%;
    }
    .eb-product-booking {
        padding: 16px !important;
    }
    .eb-product-booking__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .eb-product-booking .eb-field-row--two {
        flex-direction: column;
    }
}

/* ================================================================
   Компактная форма бронирования на странице товара
   ================================================================ */
.eb-product-booking {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
    margin: 24px 0;
    font-family: inherit;
    box-sizing: border-box;
    clear: both;
}

.eb-product-booking__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f1;
}

.eb-product-booking__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eb-product-booking__price-hint {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Два поля в ряд */
.eb-product-booking .eb-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0;
}

.eb-product-booking .eb-field-row--two .eb-field {
    flex: 1;
    min-width: 160px;
}

/* Подгоняем поля под товарную страницу */
.eb-product-booking .eb-form-wrapper {
    gap: 14px;
}

.eb-product-booking .eb-field label {
    font-size: 12px;
}

.eb-product-booking .eb-field input,
.eb-product-booking .eb-field select {
    padding: 10px 14px;
    font-size: 14px;
}

.eb-product-booking .eb-price-block {
    margin-top: 4px;
    padding: 12px 16px;
}

.eb-product-booking .eb-price-value {
    font-size: 22px;
}

.eb-product-booking .eb-submit-btn {
    padding: 14px;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.eb-product-booking .eb-contact-block {
    gap: 10px;
    padding-top: 12px;
}

/* Если тема использует узкую колонку summary */
.summary .eb-product-booking,
.product-summary .eb-product-booking {
    margin: 16px 0;
    padding: 18px;
}

.summary .eb-product-booking .eb-field-row--two .eb-field,
.product-summary .eb-product-booking .eb-field-row--two .eb-field {
    min-width: 140px;
}
