/* ============================================================
   Stripe Checkout Form — Darvaza Travel (Wide Layout)
   WP Coder → поле «CSS»
   ============================================================ */

/* --- Подключение шрифта Inter --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- Обёртка --- */
#darvaza-payment-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Карточка (По умолчанию мобильный вид) --- */
#darvaza-payment-card {
    width: 100%;
    max-width: 500px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 4px 24px rgba(3, 64, 28, 0.08),
        0 1px 3px  rgba(3, 64, 28, 0.04);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

#darvaza-payment-card:hover {
    box-shadow:
        0 8px 40px rgba(3, 64, 28, 0.12),
        0 2px 6px  rgba(3, 64, 28, 0.06);
}

/* --- Заголовок с градиентом --- */
.darvaza-payment-header {
    background: linear-gradient(135deg, #03401c 0%, #00b262 100%);
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Декоративный фоновый круг */
.darvaza-payment-header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 150px;
    height: 150px;
    background: rgba(206, 255, 211, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.darvaza-payment-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: rgba(206, 255, 211, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.darvaza-header-content {
    position: relative;
    z-index: 2;
}

.darvaza-lock-icon {
    width: 32px;
    height: 32px;
    color: #ceffd3;
    margin-bottom: 16px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.darvaza-payment-header h2 {
    margin: 0 0 8px;
    padding: 0;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.darvaza-subtitle {
    margin: 0;
    padding: 0;
    font-size: 15px;
    color: #ceffd3;
    font-weight: 400;
    letter-spacing: 0.2px;
    opacity: 0.9;
}

/* --- Тело формы --- */
.darvaza-payment-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#darvaza-stripe-form {
    padding: 40px 32px 32px;
    flex: 1;
}

/* --- Группа полей --- */
.darvaza-field-group {
    margin-bottom: 24px;
}

.darvaza-field-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #03401c;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.darvaza-field-group input[type="email"],
.darvaza-field-group input[type="text"],
.darvaza-field-group input[type="number"] {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    background: #f8faf9;
    border: 2px solid #e0e8e3;
    border-radius: 12px;
    outline: none;
    transition:
        border-color 0.25s ease,
        background-color 0.25s ease,
        box-shadow 0.25s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.darvaza-field-group input:hover {
    border-color: #c0d4c5;
}

.darvaza-field-group input:focus {
    border-color: #00b262;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 178, 98, 0.15);
}

.darvaza-field-group input::placeholder {
    color: #a0b0a5;
    font-weight: 400;
}

/* --- Поле суммы с символом валюты --- */
.darvaza-amount-wrapper {
    position: relative;
}

.darvaza-currency-symbol {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 600;
    color: #03401c;
    pointer-events: none;
    z-index: 1;
}

.darvaza-amount-wrapper input[type="number"] {
    padding-left: 40px !important;
}

/* --- Блок ошибки --- */
.darvaza-error {
    background: #ffebee;
    color: #c62828;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 24px;
    border-left: 4px solid #c62828;
    line-height: 1.5;
    animation: darvazaShakeIn 0.4s ease;
}

@keyframes darvazaShakeIn {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* --- Кнопка оплаты --- */
#darvaza-pay-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    font-family: inherit;
    color: #ffffff;
    background: linear-gradient(135deg, #00b262 0%, #009952 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 178, 98, 0.35);
    letter-spacing: 0.3px;
    line-height: 1;
    -webkit-appearance: none;
    margin-top: 10px;
}

#darvaza-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 178, 98, 0.45);
}

#darvaza-pay-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 178, 98, 0.3);
}

#darvaza-pay-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 178, 98, 0.2) !important;
}

/* --- Спиннер (анимированный круг) --- */
.darvaza-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: darvazaSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes darvazaSpin {
    to { transform: rotate(360deg); }
}

/* --- Stripe Badge --- */
.darvaza-stripe-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 20px;
    background: #fdfdfd;
    border-top: 1px solid #f0f3f1;
    font-size: 13px;
    color: #8a9a8e;
    user-select: none;
    border-radius: 0 0 16px 16px;
}

.darvaza-stripe-badge svg {
    width: 18px;
    height: 18px;
    fill: #8a9a8e;
    flex-shrink: 0;
}

.darvaza-stripe-badge strong {
    color: #5a6e5e;
    font-weight: 700;
}

/* ============================================================
   АДАПТИВНАЯ ВЁРСТКА (ШИРОКИЙ ДИЗАЙН ДЛЯ ПК)
   ============================================================ */

/* Планшеты и ПК: Разделяем на 2 колонки */
@media (min-width: 800px) {
    #darvaza-payment-card {
        max-width: 900px;
        flex-direction: row;
    }

    .darvaza-payment-header {
        flex: 0 0 35%; /* 35% ширины под заголовок */
        padding: 50px 40px;
        text-align: left;
        align-items: flex-start;
    }
    
    .darvaza-payment-header h2 {
        font-size: 32px;
    }
    
    .darvaza-subtitle {
        font-size: 16px;
    }

    .darvaza-payment-body {
        flex: 0 0 65%; /* 65% ширины под форму */
    }

    #darvaza-stripe-form {
        padding: 50px 50px 40px;
    }

    /* Располагаем Email и Номер бронирования в один ряд */
    .darvaza-form-row {
        display: flex;
        gap: 24px;
    }
    
    .darvaza-form-row .darvaza-field-group {
        flex: 1;
    }

    .darvaza-stripe-badge {
        border-radius: 0 0 16px 0;
        background: transparent;
        border-top: none;
        padding-top: 0;
        padding-bottom: 24px;
        justify-content: flex-end;
        padding-right: 50px;
    }
}

/* Мобильные устройства */
@media (max-width: 520px) {
    #darvaza-payment-wrapper {
        padding: 20px 12px;
    }

    #darvaza-payment-card {
        border-radius: 12px;
    }

    .darvaza-payment-header {
        padding: 30px 20px 24px;
    }

    .darvaza-payment-header h2 {
        font-size: 22px;
    }

    #darvaza-stripe-form {
        padding: 24px 20px;
    }

    #darvaza-pay-btn {
        padding: 14px;
        font-size: 16px;
    }
}

/* --- Скрытие стрелок в поле number --- */
/* Chrome, Safari, Edge */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}
