/**
 * GS CTA Popup - Frontend CSS
 * Version: 2.8.2
 * 
 * ============================================
 * ISOLATION STRATEGY
 * ============================================
 * 1. High specificity selectors: html body .gs-cta-popup .gs-cta-popup__root
 * 2. Local CSS Reset for form elements
 * 3. CSS Variables with fallbacks
 * 4. RTL with unicode-bidi: plaintext for all form fields
 * 5. unicode-bidi: isolate on modal content
 * 6. Failsafe colors to prevent white-on-white
 * 7. !important only where absolutely necessary
 * 
 * This CSS is designed to be immune to:
 * - Elementor Pro styles
 * - Hello Elementor theme
 * - Anemos and similar themes
 * - Global CSS that targets input/select/button
 * - External direction/text-align overrides
 */

/* ============================================
   CSS CUSTOM PROPERTIES (Tokens)
   Scoped to .gs-cta-popup only
   ============================================ */
.gs-cta-popup {
    /* Brand Colors - Customizable via admin */
    --gs-primary: #3580AA;
    --gs-primary-hover: #2a6a8f;
    --gs-accent: #f0c24b;
    
    /* Text Colors - Failsafe dark values */
    --gs-text: #0F172A;
    --gs-text-secondary: #475569;
    --gs-text-muted: #64748B;
    --gs-text-error: #DC2626;
    --gs-text-success: #059669;
    --gs-text-on-primary: #FFFFFF;
    
    /* Backgrounds */
    --gs-bg: #FFFFFF;
    --gs-bg-overlay: rgba(15, 23, 42, 0.6);
    --gs-bg-field: #FFFFFF;
    --gs-bg-error: #FEF2F2;
    --gs-bg-success: #ECFDF5;
    --gs-bg-disabled: #F1F5F9;
    
    /* Borders */
    --gs-border: #CBD5E1;
    --gs-border-hover: #94A3B8;
    --gs-border-focus: var(--gs-primary);
    --gs-border-error: #DC2626;
    
    /* Spacing & Sizing */
    --gs-gap: 16px;
    --gs-padding: 32px;
    --gs-radius: 12px;
    --gs-radius-sm: 8px;
    --gs-field-height: 48px;
    
    /* Shadows */
    --gs-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gs-shadow-focus: 0 0 0 3px rgba(53, 128, 170, 0.25);
}

/* ============================================
   LOCAL CSS RESET
   Neutralize common theme/Elementor overrides
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root,
html body .gs-cta-popup .gs-cta-popup__root *,
html body .gs-cta-popup .gs-cta-popup__root *::before,
html body .gs-cta-popup .gs-cta-popup__root *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font-weight: normal;
    font-style: normal;
    text-transform: none;
    letter-spacing: normal;
    text-decoration: none;
    vertical-align: baseline;
    background: transparent;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: none;
}

/* Reset specific elements */
html body .gs-cta-popup .gs-cta-popup__root input,
html body .gs-cta-popup .gs-cta-popup__root select,
html body .gs-cta-popup .gs-cta-popup__root textarea,
html body .gs-cta-popup .gs-cta-popup__root button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    background-color: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

html body .gs-cta-popup .gs-cta-popup__root h1,
html body .gs-cta-popup .gs-cta-popup__root h2,
html body .gs-cta-popup .gs-cta-popup__root h3,
html body .gs-cta-popup .gs-cta-popup__root h4,
html body .gs-cta-popup .gs-cta-popup__root h5,
html body .gs-cta-popup .gs-cta-popup__root h6,
html body .gs-cta-popup .gs-cta-popup__root p,
html body .gs-cta-popup .gs-cta-popup__root span,
html body .gs-cta-popup .gs-cta-popup__root label,
html body .gs-cta-popup .gs-cta-popup__root a {
    margin: 0;
    padding: 0;
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    text-decoration: none;
}

/* ============================================
   MODAL BASE STRUCTURE
   ============================================ */
html body .gs-cta-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

html body .gs-cta-popup.gs-cta-modal-active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Root container - all styles inherit from here */
html body .gs-cta-popup .gs-cta-popup__root {
    position: absolute;
    inset: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--gs-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Overlay */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-overlay {
    position: absolute;
    inset: 0;
    background: var(--gs-bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Container */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Content Box - CRITICAL: Explicit background and text colors + RTL isolation */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-content {
    background-color: var(--gs-bg) !important;
    color: var(--gs-text) !important;
    border-radius: var(--gs-radius);
    padding: var(--gs-padding);
    position: relative;
    box-shadow: var(--gs-shadow);
    /* RTL/BiDi isolation - prevents external CSS from affecting text direction */
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: isolate !important;
}

/* ============================================
   CLOSE BUTTON - Top Left (RTL)
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    right: auto;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    border: none !important;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--gs-text-secondary) !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: var(--gs-text) !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-close:focus {
    outline: 2px solid var(--gs-primary) !important;
    outline-offset: 2px;
}

/* ============================================
   HEADER
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-header {
    text-align: center;
    margin-bottom: 28px;
    padding-top: 8px;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--gs-text) !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-subtitle {
    font-size: 15px !important;
    font-weight: 400 !important;
    color: var(--gs-text-secondary) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* ============================================
   FORM LAYOUT - CSS Grid
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-form-content {
    display: block;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-form {
    display: block;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-form-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gs-gap);
}

/* Half width */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field-wrapper.gs-cta-field-half {
    grid-column: span 1;
}

/* Full width */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field-wrapper.gs-cta-field-full {
    grid-column: span 2;
}

/* Field container */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field {
    position: relative;
    width: 100%;
}

/* ============================================
   FORM FIELDS - Input, Select, Textarea
   HIGH SPECIFICITY to override Elementor
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input[type="text"],
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input[type="email"],
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input[type="tel"],
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input[type="number"],
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-height: var(--gs-field-height) !important;
    padding: 12px 16px !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: var(--gs-text) !important;
    background-color: var(--gs-bg-field) !important;
    border: 1.5px solid var(--gs-border) !important;
    border-radius: var(--gs-radius-sm) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    /* RTL/BiDi isolation - default Hebrew-safe */
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
}

/* ============================================
   PLACEHOLDER - Failsafe readable color
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input::placeholder,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea::placeholder {
    color: var(--gs-text-muted) !important;
    opacity: 1 !important;
    -webkit-text-fill-color: var(--gs-text-muted) !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input::-webkit-input-placeholder,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea::-webkit-input-placeholder {
    color: var(--gs-text-muted) !important;
    opacity: 1 !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input::-moz-placeholder,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea::-moz-placeholder {
    color: var(--gs-text-muted) !important;
    opacity: 1 !important;
}

/* ============================================
   FOCUS STATE
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input:focus,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select:focus,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea:focus {
    border-color: var(--gs-border-focus) !important;
    box-shadow: var(--gs-shadow-focus) !important;
    outline: none !important;
    background-color: var(--gs-bg-field) !important;
}

/* ============================================
   HOVER STATE
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input:hover:not(:focus):not(:disabled),
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select:hover:not(:focus):not(:disabled),
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea:hover:not(:focus):not(:disabled) {
    border-color: var(--gs-border-hover) !important;
}

/* ============================================
   DISABLED STATE
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input:disabled,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select:disabled,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea:disabled {
    background-color: var(--gs-bg-disabled) !important;
    color: var(--gs-text-muted) !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* ============================================
   TEXTAREA
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea {
    resize: vertical !important;
    min-height: 120px !important;
}

/* ============================================
   SELECT - Custom arrow on LEFT (RTL)
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select {
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 14px center !important;
    background-size: 16px !important;
    padding-left: 44px !important;
    padding-right: 16px !important;
    /* RTL/BiDi isolation */
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select option {
    color: var(--gs-text) !important;
    background-color: var(--gs-bg) !important;
    padding: 12px !important;
    /* RTL/BiDi isolation for options */
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select option[value=""] {
    color: var(--gs-text-muted) !important;
}

/* ============================================
   FLOATING LABELS
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-floating-label {
    position: absolute !important;
    top: 50% !important;
    right: 16px !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: var(--gs-text-muted) !important;
    pointer-events: none !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    padding: 0 4px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100% - 40px) !important;
    /* RTL/BiDi for Hebrew labels */
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
}

/* Textarea label */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea ~ .gs-cta-floating-label {
    top: 18px !important;
    transform: translateY(0) !important;
}

/* Select label */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-floating-label.gs-cta-select-label {
    right: 16px !important;
}

/* Required asterisk */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-floating-label .gs-required {
    color: var(--gs-text-error) !important;
    margin-right: 2px !important;
}

/* Float label on focus/filled */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input:focus ~ .gs-cta-floating-label,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input:not(:placeholder-shown) ~ .gs-cta-floating-label,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select:focus ~ .gs-cta-floating-label,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select.has-value ~ .gs-cta-floating-label,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea:focus ~ .gs-cta-floating-label,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea:not(:placeholder-shown) ~ .gs-cta-floating-label {
    top: 0 !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    color: var(--gs-primary) !important;
    background: var(--gs-bg) !important;
}

/* ============================================
   ERROR STATES
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input.gs-cta-field-error,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select.gs-cta-field-error,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea.gs-cta-field-error {
    border-color: var(--gs-border-error) !important;
    background-color: var(--gs-bg-error) !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input.gs-cta-field-error ~ .gs-cta-floating-label,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select.gs-cta-field-error ~ .gs-cta-floating-label,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea.gs-cta-field-error ~ .gs-cta-floating-label {
    color: var(--gs-text-error) !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field-error-msg {
    display: block !important;
    color: var(--gs-text-error) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    margin-top: 6px !important;
    text-align: right !important;
    line-height: 1.4 !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-form-error {
    background-color: var(--gs-bg-error) !important;
    color: var(--gs-text-error) !important;
    padding: 14px 16px !important;
    border-radius: var(--gs-radius-sm) !important;
    margin-top: 16px !important;
    font-size: 14px !important;
    text-align: center !important;
    border: 1px solid #FECACA !important;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-form-submit {
    margin-top: 24px !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-submit-btn {
    display: block !important;
    width: 100% !important;
    min-height: var(--gs-field-height) !important;
    padding: 14px 24px !important;
    background-color: var(--gs-primary) !important;
    color: var(--gs-text-on-primary) !important;
    border: none !important;
    border-radius: var(--gs-radius-sm) !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-submit-btn:hover {
    background-color: var(--gs-primary-hover) !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-submit-btn:active {
    transform: translateY(1px) !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-submit-btn:focus {
    outline: 2px solid var(--gs-primary) !important;
    outline-offset: 2px !important;
}

html body .gs-cta-popup .gs-cta-popup__root .gs-cta-submit-btn:disabled {
    background-color: #94A3B8 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-success-message {
    text-align: center !important;
    padding: 40px 24px !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    color: var(--gs-text-success) !important;
    background-color: var(--gs-bg-success) !important;
    border-radius: var(--gs-radius-sm) !important;
    border: 1px solid #A7F3D0 !important;
    line-height: 1.5 !important;
}

/* ============================================
   BODY LOCK
   ============================================ */
body.gs-cta-modal-open {
    overflow: hidden !important;
}

/* ============================================
   RTL SUPPORT - Full Implementation
   ============================================ */
html body .gs-cta-popup.gs-cta-rtl .gs-cta-popup__root,
html body .gs-cta-popup[dir="rtl"] .gs-cta-popup__root {
    direction: rtl !important;
    text-align: right !important;
}

/* RTL - Close button stays LEFT */
html body .gs-cta-popup.gs-cta-rtl .gs-cta-popup__root .gs-cta-modal-close,
html body .gs-cta-popup[dir="rtl"] .gs-cta-popup__root .gs-cta-modal-close {
    left: 16px !important;
    right: auto !important;
}

/* RTL - Form fields with unicode-bidi for punctuation */
html body .gs-cta-popup.gs-cta-rtl .gs-cta-popup__root .gs-cta-field input,
html body .gs-cta-popup.gs-cta-rtl .gs-cta-popup__root .gs-cta-field textarea,
html body .gs-cta-popup[dir="rtl"] .gs-cta-popup__root .gs-cta-field input,
html body .gs-cta-popup[dir="rtl"] .gs-cta-popup__root .gs-cta-field textarea {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
}

/* RTL - Floating label */
html body .gs-cta-popup.gs-cta-rtl .gs-cta-popup__root .gs-cta-floating-label,
html body .gs-cta-popup[dir="rtl"] .gs-cta-popup__root .gs-cta-floating-label {
    right: 16px !important;
    left: auto !important;
    text-align: right !important;
    direction: rtl !important;
    unicode-bidi: plaintext !important;
}

/* RTL - Select arrow stays LEFT */
html body .gs-cta-popup.gs-cta-rtl .gs-cta-popup__root .gs-cta-field select,
html body .gs-cta-popup[dir="rtl"] .gs-cta-popup__root .gs-cta-field select {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
    background-position: left 14px center !important;
    padding-left: 44px !important;
    padding-right: 16px !important;
}

/* RTL - Select options */
html body .gs-cta-popup.gs-cta-rtl .gs-cta-popup__root .gs-cta-field select option,
html body .gs-cta-popup[dir="rtl"] .gs-cta-popup__root .gs-cta-field select option {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext !important;
}

/* RTL - Error message */
html body .gs-cta-popup.gs-cta-rtl .gs-cta-popup__root .gs-cta-field-error-msg,
html body .gs-cta-popup[dir="rtl"] .gs-cta-popup__root .gs-cta-field-error-msg {
    text-align: right !important;
    direction: rtl !important;
    unicode-bidi: plaintext !important;
}

/* RTL - Required asterisk */
html body .gs-cta-popup.gs-cta-rtl .gs-cta-popup__root .gs-cta-floating-label .gs-required,
html body .gs-cta-popup[dir="rtl"] .gs-cta-popup__root .gs-cta-floating-label .gs-required {
    margin-right: 0 !important;
    margin-left: 2px !important;
}

/* ============================================
   LTR SUPPORT (explicit)
   ============================================ */
html body .gs-cta-popup.gs-cta-ltr .gs-cta-popup__root,
html body .gs-cta-popup[dir="ltr"] .gs-cta-popup__root {
    direction: ltr !important;
    text-align: left !important;
}

html body .gs-cta-popup.gs-cta-ltr .gs-cta-popup__root .gs-cta-modal-close,
html body .gs-cta-popup[dir="ltr"] .gs-cta-popup__root .gs-cta-modal-close {
    left: auto !important;
    right: 16px !important;
}

html body .gs-cta-popup.gs-cta-ltr .gs-cta-popup__root .gs-cta-field input,
html body .gs-cta-popup.gs-cta-ltr .gs-cta-popup__root .gs-cta-field textarea,
html body .gs-cta-popup[dir="ltr"] .gs-cta-popup__root .gs-cta-field input,
html body .gs-cta-popup[dir="ltr"] .gs-cta-popup__root .gs-cta-field textarea {
    direction: ltr !important;
    text-align: left !important;
}

html body .gs-cta-popup.gs-cta-ltr .gs-cta-popup__root .gs-cta-floating-label,
html body .gs-cta-popup[dir="ltr"] .gs-cta-popup__root .gs-cta-floating-label {
    right: auto !important;
    left: 16px !important;
    text-align: left !important;
}

html body .gs-cta-popup.gs-cta-ltr .gs-cta-popup__root .gs-cta-field select,
html body .gs-cta-popup[dir="ltr"] .gs-cta-popup__root .gs-cta-field select {
    direction: ltr !important;
    text-align: left !important;
    background-position: right 14px center !important;
    padding-right: 44px !important;
    padding-left: 16px !important;
}

html body .gs-cta-popup.gs-cta-ltr .gs-cta-popup__root .gs-cta-field-error-msg,
html body .gs-cta-popup[dir="ltr"] .gs-cta-popup__root .gs-cta-field-error-msg {
    text-align: left !important;
}

html body .gs-cta-popup.gs-cta-ltr .gs-cta-popup__root .gs-cta-floating-label .gs-required,
html body .gs-cta-popup[dir="ltr"] .gs-cta-popup__root .gs-cta-floating-label .gs-required {
    margin-left: 0 !important;
    margin-right: 2px !important;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-content {
        padding: 24px 20px !important;
    }
    
    /* Single column on mobile */
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-form-fields {
        grid-template-columns: 1fr !important;
    }
    
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field-wrapper.gs-cta-field-half,
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field-wrapper.gs-cta-field-full {
        grid-column: span 1 !important;
    }
    
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-title {
        font-size: 20px !important;
    }
    
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-modal-subtitle {
        font-size: 14px !important;
    }
    
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-form-fields {
        gap: 12px !important;
    }
    
    /* Prevent iOS zoom on input focus */
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input,
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select,
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea {
        font-size: 16px !important;
    }
}

/* ============================================
   AUTOFILL OVERRIDE
   ============================================ */
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input:-webkit-autofill,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input:-webkit-autofill:hover,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input:-webkit-autofill:focus,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select:-webkit-autofill,
html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--gs-bg-field) inset !important;
    -webkit-text-fill-color: var(--gs-text) !important;
    caret-color: var(--gs-text) !important;
}

/* ============================================
   CTA BUTTON/BANNER (Outside popup)
   These are NOT inside the isolated scope
   ============================================ */
.gs-cta-wrapper {
    margin: 20px 0;
}

.gs-cta-button {
    display: inline-block;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.4;
}

.gs-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gs-cta-button:active {
    transform: translateY(0);
}

.gs-cta-subtitle {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #475569;
}

/* Banner styles */
.gs-cta-banner-wrapper {
    position: relative;
}

.gs-cta-banner {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.gs-cta-banner img {
    transition: transform 0.3s ease;
}

.gs-cta-banner:hover img {
    transform: scale(1.02);
}

.gs-cta-banner-rounded,
.gs-cta-banner-rounded img {
    border-radius: 12px;
}

.gs-cta-banner-full {
    width: 100%;
}

.gs-cta-banner-contained {
    max-width: 100%;
}

.gs-cta-banner-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    z-index: 2;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-contrast: high) {
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field input,
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field select,
    html body .gs-cta-popup .gs-cta-popup__root .gs-cta-field textarea {
        border-width: 2px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body .gs-cta-popup .gs-cta-popup__root,
    html body .gs-cta-popup .gs-cta-popup__root * {
        transition: none !important;
    }
}
