/* ============================================================
   contacts_page — Блок «Страница контактов»
   Зависимости: nexa-builder.css (переменные --nx-*)
   ============================================================ */

/* ── Секция ──────────────────────────────────────────────── */
.nexa-contacts-block {
    background: var(--nx-bg, #fff);
    color: var(--nx-text, #1a1a2e);
    width: 100%;
}

/* Цветовые схемы */
.nexa-contacts-block--light {
    background: var(--nx-bg-subtle, #f5f5f7);
    color: var(--nx-text, #1a1a2e);
}

.nexa-contacts-block--dark {
    background: var(--nx-dark-bg, #12121c);
    color: var(--nx-dark-text, #e8e8f0);
    --nx-text: var(--nx-dark-text, #e8e8f0);
    --nx-muted: var(--nx-dark-muted, #7a7a9a);
    --nx-border: var(--nx-dark-border, #2a2a3e);
    --nx-bg-subtle: var(--nx-dark-bg-subtle, #1e1e2e);
}

.nexa-contacts-block--accent {
    background: var(--nx-accent, #6c5ce7);
    color: #fff;
    --nx-text: #fff;
    --nx-muted: rgba(255, 255, 255, 0.7);
    --nx-border: rgba(255, 255, 255, 0.25);
    --nx-bg-subtle: rgba(255, 255, 255, 0.12);
}

/* ── Заголовки блока ─────────────────────────────────────── */
.nexa-contacts-block__title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--nx-text, #1a1a2e);
    margin: 0 0 12px;
}

.nexa-contacts-block__subtitle {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--nx-muted, #6b7280);
    margin: 0 0 36px;
    max-width: 600px;
}

/* ── Макет (layout) ──────────────────────────────────────── */
.nexa-contacts-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

/* Два столбца */
.nexa-contacts-layout--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

/* Одна колонка (только контакты или только форма) */
.nexa-contacts-layout--contacts_only,
.nexa-contacts-layout--form_only {
    display: block;
    max-width: 640px;
    margin: 0 auto;
}

/* ── Контактная информация ───────────────────────────────── */
.nexa-contacts-info {
    display: flex;
    flex-direction: column;
}

.nexa-contacts-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.nexa-contacts-item:last-child {
    margin-bottom: 0;
}

.nexa-contacts-item__icon {
    font-size: 1.5rem;
    color: var(--nx-accent, #6c5ce7);
    flex-shrink: 0;
    margin-top: 2px;
    line-height: 1;
}

.nexa-contacts-item__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--nx-muted, #6b7280);
    margin-bottom: 4px;
}

.nexa-contacts-item__value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--nx-text, #1a1a2e);
    line-height: 1.5;
}

a.nexa-contacts-item__value {
    text-decoration: none;
    transition: color 0.18s ease;
}

a.nexa-contacts-item__value:hover {
    color: var(--nx-accent, #6c5ce7);
}

/* ── Карта ───────────────────────────────────────────────── */
.nexa-contacts-map {
    margin-top: 24px;
    border-radius: var(--nx-radius, 12px);
    overflow: hidden;
    box-shadow: var(--nx-shadow, 0 2px 16px rgba(0,0,0,0.08));
}

.nexa-contacts-map iframe {
    display: block;
    width: 100%;
    height: 280px;
    border: none;
}

/* ── Форма ───────────────────────────────────────────────── */
.nexa-contacts-form-wrap {
    display: flex;
    flex-direction: column;
}

.nexa-contacts-form__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--nx-text, #1a1a2e);
    margin: 0 0 20px;
    line-height: 1.3;
}

/* ── Успех / ошибка ──────────────────────────────────────── */
.nexa-contacts-success,
.nexa-contacts-error {
    padding: 16px 20px;
    border-radius: var(--nx-radius-sm, 8px);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nexa-contacts-success {
    background: var(--nx-bg-subtle, #f5f5f7);
    border-left: 4px solid #22c55e;
    color: var(--nx-text, #1a1a2e);
}

.nexa-contacts-success .ti-circle-check {
    color: #22c55e;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nexa-contacts-error {
    background: var(--nx-bg-subtle, #f5f5f7);
    border-left: 4px solid #ef4444;
    color: var(--nx-text, #1a1a2e);
}

/* ── Поля формы ──────────────────────────────────────────── */
.nexa-contacts-form {
    display: flex;
    flex-direction: column;
}

.nexa-cf-field {
    margin-bottom: 16px;
}

.nexa-cf-field:last-child {
    margin-bottom: 0;
}

.nexa-cf-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nx-text, #1a1a2e);
    margin-bottom: 6px;
}

.nexa-cf-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--nx-text, #1a1a2e);
    background: var(--nx-bg, #fff);
    border: 1.5px solid var(--nx-border, #e2e8f0);
    border-radius: var(--nx-radius-sm, 8px);
    line-height: 1.5;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.nexa-cf-input::placeholder {
    color: var(--nx-muted, #9ca3af);
}

.nexa-cf-input:focus {
    outline: none;
    border-color: var(--nx-accent, #6c5ce7);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nx-accent, #6c5ce7) 15%, transparent);
}

.nexa-cf-textarea {
    height: 110px;
    resize: vertical;
    min-height: 80px;
}

/* ── Кнопка отправки ─────────────────────────────────────── */
.nexa-cf-actions {
    margin-top: 8px;
}

.nexa-contacts-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.12s ease;
}

.nexa-contacts-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.nexa-contacts-submit:not(:disabled):hover {
    transform: translateY(-1px);
}

.nexa-contacts-submit__spinner {
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    opacity: 0.7;
}

/* ── Схема dark: переопределение инпутов ─────────────────── */
.nexa-contacts-block--dark .nexa-cf-input {
    background: var(--nx-dark-bg-subtle, #1e1e2e);
    color: var(--nx-dark-text, #e8e8f0);
    border-color: var(--nx-dark-border, #2a2a3e);
}

.nexa-contacts-block--dark .nexa-cf-input::placeholder {
    color: var(--nx-dark-muted, #5a5a7a);
}

.nexa-contacts-block--dark .nexa-contacts-form__title,
.nexa-contacts-block--dark .nexa-cf-label,
.nexa-contacts-block--dark .nexa-contacts-block__title {
    color: var(--nx-dark-text, #e8e8f0);
}

.nexa-contacts-block--dark .nexa-contacts-success,
.nexa-contacts-block--dark .nexa-contacts-error {
    background: var(--nx-dark-bg-subtle, #1e1e2e);
    color: var(--nx-dark-text, #e8e8f0);
}

/* ── Схема accent: переопределение инпутов ───────────────── */
.nexa-contacts-block--accent .nexa-cf-input {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.nexa-contacts-block--accent .nexa-cf-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.nexa-contacts-block--accent .nexa-cf-input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.nexa-contacts-block--accent .nexa-cf-label,
.nexa-contacts-block--accent .nexa-contacts-form__title,
.nexa-contacts-block--accent .nexa-contacts-block__title,
.nexa-contacts-block--accent .nexa-contacts-block__subtitle,
.nexa-contacts-block--accent .nexa-contacts-item__label,
.nexa-contacts-block--accent .nexa-contacts-item__value,
.nexa-contacts-block--accent a.nexa-contacts-item__value {
    color: #fff;
}

.nexa-contacts-block--accent .nexa-contacts-item__icon {
    color: rgba(255, 255, 255, 0.85);
}

.nexa-contacts-block--accent .nexa-contacts-success,
.nexa-contacts-block--accent .nexa-contacts-error {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ── Адаптив (mobile) ────────────────────────────────────── */
@media (max-width: 767px) {
    .nexa-contacts-layout--split {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .nexa-contacts-layout--contacts_only,
    .nexa-contacts-layout--form_only {
        max-width: 100%;
    }

    .nexa-contacts-map iframe {
        height: 220px;
    }

    .nexa-contacts-block__subtitle {
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .nexa-contacts-block__title {
        font-size: 1.5rem;
    }

    .nexa-cf-input {
        font-size: 1rem; /* Prevent iOS zoom on focus */
    }
}
