/* ═══════════════════════════════════════════════
   OVO City Selector — Frontend Styles
   ════════════════════════════════════════════════ */

@font-face {
    font-family: 'Matahari';
    src: local('Matahari');
}

:root {
    --ovo-blue:       #4a90e8;
    --ovo-bg:         #0c0d10;
    --ovo-surface:    #14161c;
    --ovo-border:     rgba(255,255,255,0.08);
    --ovo-text:       #f0f2f7;
    --ovo-muted:      rgba(240,242,247,0.45);
    --ovo-radius:     18px;
    --ovo-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Overlay ───────────────────────────────────────────
   ВАЖНО: display:flex всегда, но pointer-events:none
   когда скрыт — это главный фикс "призрачных кликов"
   ───────────────────────────────────────────────────── */

.ovo-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(8, 9, 12, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ovo-transition);
}

.ovo-overlay.ovo-visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Modal card ────────────────────────────────── */

.ovo-modal {
    position: relative;
    background: var(--ovo-surface);
    border: 1px solid var(--ovo-border);
    border-radius: var(--ovo-radius);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    transform: translateY(28px) scale(0.97);
    transition: transform var(--ovo-transition);
    box-shadow:
        0 0 0 1px rgba(74, 144, 232, 0.08),
        0 32px 80px rgba(0,0,0,0.6),
        0 8px 24px rgba(0,0,0,0.4);
}

.ovo-overlay.ovo-visible .ovo-modal {
    transform: translateY(0) scale(1);
}

/* ── Decorative glow ───────────────────────────── */

.ovo-modal-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 220px;
    background: radial-gradient(ellipse at center,
        rgba(74, 144, 232, 0.22) 0%,
        transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Inner content ─────────────────────────────── */

.ovo-modal-inner {
    position: relative;
    z-index: 1;
    padding: 36px 36px 28px;
}

.ovo-modal-title {
    font-family: 'Matahari', sans-serif !important;
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--ovo-text);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.ovo-modal-sub {
    font-size: 13px;
    color: var(--ovo-muted);
    margin: 0 0 28px;
    line-height: 1.5;
}

/* ── City list ─────────────────────────────────── */

.ovo-city-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ovo-city-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--ovo-border);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    color: var(--ovo-text);
    font-size: 15px;
    font-weight: 500;
    transition:
        background var(--ovo-transition),
        border-color var(--ovo-transition),
        transform var(--ovo-transition);
    outline: none;
}

.ovo-city-item:hover,
.ovo-city-item:focus-visible {
    background: rgba(74, 144, 232, 0.10);
    border-color: rgba(74, 144, 232, 0.35);
    transform: translateX(3px);
}

.ovo-city-item.ovo-city-selected {
    background: #ffffff !important;
    border-color: rgba(255,255,255,0.6) !important;
    color: #0c0d10 !important;
}

.ovo-city-item.ovo-city-selected .ovo-city-dot {
    background: #0c0d10;
    opacity: 1;
}

.ovo-city-item.ovo-city-selected .ovo-city-arrow {
    color: #0c0d10;
}

.ovo-city-item:active {
    transform: translateX(3px) scale(0.98);
}

.ovo-city-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ovo-blue);
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity var(--ovo-transition), transform var(--ovo-transition);
}

.ovo-city-item:hover .ovo-city-dot,
.ovo-city-item:focus-visible .ovo-city-dot {
    opacity: 1;
    transform: scale(1.3);
}

.ovo-city-name {
    flex: 1;
}

.ovo-city-arrow {
    width: 18px;
    height: 18px;
    color: var(--ovo-muted);
    flex-shrink: 0;
    transition: color var(--ovo-transition), transform var(--ovo-transition);
}

.ovo-city-item:hover .ovo-city-arrow,
.ovo-city-item:focus-visible .ovo-city-arrow {
    color: var(--ovo-blue);
    transform: translateX(2px);
}

/* ── Footer note ───────────────────────────────── */

.ovo-modal-footer-note {
    margin: 20px 0 0;
    font-size: 11px;
    color: var(--ovo-muted);
    text-align: center;
    line-height: 1.5;
}

/* ── Header labels (shortcode output) ─────────── */

.ovo-city-label,
.ovo-phone-label,
.ovo-address-label {
    transition: opacity 0.2s ease;
}

.ovo-phone-label {
    color: inherit;
    text-decoration: none;
}

.ovo-phone-label:hover {
    text-decoration: underline;
}

/* ── Phone + city button wrapper (шапка) ───────── */

.ovo-phone-city-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
}

/* ── Кнопка смены города в шапке ──────────────── */

.ovo-city-change-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Matahari', sans-serif !important;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff !important;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1.2;
    letter-spacing: 0.01em;
    opacity: 0.9;
    transition: opacity var(--ovo-transition);
}

.ovo-city-change-btn:hover {
    opacity: 1;
}

.ovo-city-change-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.ovo-city-btn-chevron {
    opacity: 0.65;
    transition: transform var(--ovo-transition);
}

.ovo-city-change-btn:hover .ovo-city-btn-chevron {
    transform: translateY(1px);
}

/* ── Responsive ────────────────────────────────── */

@media (max-width: 480px) {
    .ovo-modal-inner {
        padding: 28px 22px 22px;
    }
    .ovo-city-item {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* ═══════════════════════════════════════════════
   FEEDBACK MODAL
   ═══════════════════════════════════════════════ */

.ovo-fb-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(8, 9, 12, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.ovo-fb-overlay.ovo-fb-visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Modal card ────────────────────────────────── */

.ovo-fb-modal {
    position: relative;
    background: #14161c;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    transform: translateY(28px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 0 0 1px rgba(74,144,232,0.08),
        0 32px 80px rgba(0,0,0,0.65),
        0 8px 24px rgba(0,0,0,0.4);
}

.ovo-fb-overlay.ovo-fb-visible .ovo-fb-modal {
    transform: translateY(0) scale(1);
}

/* ── Glow ──────────────────────────────────────── */

.ovo-fb-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 260px;
    height: 260px;
    background: radial-gradient(ellipse at center,
        rgba(74, 144, 232, 0.18) 0%,
        transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Close button ──────────────────────────────── */

.ovo-fb-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(240,242,247,0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.ovo-fb-close svg {
    width: 16px;
    height: 16px;
}

.ovo-fb-close:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* ── Inner ─────────────────────────────────────── */

.ovo-fb-inner {
    position: relative;
    z-index: 1;
    padding: 36px 36px 32px;
}

.ovo-fb-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #4a90e8;
    margin-bottom: 10px;
}

.ovo-fb-title {
    font-family: 'Matahari', sans-serif !important;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    color: #f0f2f7;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.ovo-fb-sub {
    font-size: 13px;
    color: rgba(240,242,247,0.45);
    margin: 0 0 26px;
    line-height: 1.55;
}

.ovo-fb-no-form {
    color: rgba(240,242,247,0.55);
    font-size: 13px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0;
}

/* ── CF7 form styles ───────────────────────────── */

/* Общий враппер CF7 */
#ovo-feedback-overlay .wpcf7 {
    margin: 0;
}

#ovo-feedback-overlay .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Все текстовые инпуты */
#ovo-feedback-overlay .wpcf7-form input[type="text"],
#ovo-feedback-overlay .wpcf7-form input[type="tel"],
#ovo-feedback-overlay .wpcf7-form input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    font-family: 'Matahari', sans-serif !important;
    font-size: 15px !important;
    color: #f0f2f7 !important;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
}

#ovo-feedback-overlay .wpcf7-form input[type="text"]::placeholder,
#ovo-feedback-overlay .wpcf7-form input[type="tel"]::placeholder {
    color: rgba(240,242,247,0.3) !important;
}

#ovo-feedback-overlay .wpcf7-form input[type="text"]:focus,
#ovo-feedback-overlay .wpcf7-form input[type="tel"]:focus {
    border-color: rgba(74,144,232,0.5) !important;
    background: rgba(74,144,232,0.06) !important;
}

/* Acceptance / чекбокс */
#ovo-feedback-overlay .ovo-cf7-acceptance,
#ovo-feedback-overlay .wpcf7-acceptance {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 !important;
}

#ovo-feedback-overlay .wpcf7-acceptance .wpcf7-list-item {
    margin: 0 !important;
}

#ovo-feedback-overlay .wpcf7-acceptance input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    margin: 2px 0 0 !important;
    accent-color: #4a90e8;
    cursor: pointer;
    flex-shrink: 0;
}

#ovo-feedback-overlay .wpcf7-acceptance .wpcf7-list-item-label {
    font-size: 12px !important;
    color: rgba(240,242,247,0.45) !important;
    line-height: 1.5;
    cursor: pointer;
}

#ovo-feedback-overlay .wpcf7-acceptance .wpcf7-list-item-label a {
    color: #4a90e8 !important;
    text-decoration: none;
}

#ovo-feedback-overlay .wpcf7-acceptance .wpcf7-list-item-label a:hover {
    text-decoration: underline;
}

/* Кнопка Submit */
#ovo-feedback-overlay .ovo-cf7-submit,
#ovo-feedback-overlay .wpcf7-submit {
    width: 100% !important;
    padding: 15px 24px !important;
    background: #4a90e8 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-family: 'Matahari', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    cursor: pointer !important;
    transition: background 0.2s, transform 0.15s !important;
    margin-top: 4px;
    -webkit-appearance: none;
}

#ovo-feedback-overlay .ovo-cf7-submit:hover,
#ovo-feedback-overlay .wpcf7-submit:hover {
    background: #357bd8 !important;
    transform: translateY(-1px) !important;
}

#ovo-feedback-overlay .ovo-cf7-submit:active,
#ovo-feedback-overlay .wpcf7-submit:active {
    transform: translateY(0) !important;
}

/* Спиннер CF7 */
#ovo-feedback-overlay .wpcf7-spinner {
    display: none !important;
}

/* Сообщения CF7 */
#ovo-feedback-overlay .wpcf7-response-output {
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font-size: 13px !important;
    margin: 4px 0 0 !important;
    border: none !important;
}

#ovo-feedback-overlay .wpcf7-mail-sent-ok {
    background: rgba(52, 211, 153, 0.12) !important;
    color: #34d399 !important;
    border: 1px solid rgba(52,211,153,0.25) !important;
}

#ovo-feedback-overlay .wpcf7-validation-errors,
#ovo-feedback-overlay .wpcf7-mail-sent-ng {
    background: rgba(248, 113, 113, 0.10) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248,113,113,0.2) !important;
}

#ovo-feedback-overlay .wpcf7-not-valid-tip {
    font-size: 11px !important;
    color: #f87171 !important;
    margin-top: 4px !important;
}

/* ── Responsive ────────────────────────────────── */

@media (max-width: 480px) {
    .ovo-fb-inner {
        padding: 28px 20px 24px;
    }
    .ovo-fb-title {
        font-size: 24px;
    }
}
