/* ── Badge — sits at the very top of the form wrapper ─────────────────────── */
.efss-protected-badge {
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
}

.efss-protected-badge a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 20px !important;
    border-radius: 9999px !important;
    background: #1e293b !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.3px !important;
}

.efss-protected-badge a:hover {
    background: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.efss-badge-icon {
    display: inline-block !important;
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0 !important;
    /* Shield SVG — no emoji so rendering is consistent cross-platform */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233b82f6'%3E%3Cpath d='M12 2L3 7v5c0 5.25 3.75 10.15 9 11.35C17.25 22.15 21 17.25 21 12V7L12 2z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    line-height: 1 !important;
}

.efss-badge-text {
    line-height: 1 !important;
    color: #ffffff !important;
}

/* ── Badge — form-plugin scoped overrides ───────────────────────────────────
   WPForms, GF, and CF7 all ship their own child-element resets that can strip
   margin and collapse block children. These selectors restore the badge to a
   full-width row regardless of the plugin's internal flex/grid layout.       */
.wpforms-form .efss-protected-badge,
.gform_wrapper .efss-protected-badge,
.wpcf7-form .efss-protected-badge {
    display: block !important;
    width: 100% !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    flex: none !important; /* escape flex-child collapsing inside GF fieldsets */
    grid-column: 1 / -1 !important; /* span all columns if GF uses a CSS grid  */
}

/* ── Validation error — position-agnostic, works below any submit wrapper ──
   All visual properties carry !important so they are not overridden by
   WPForms, CF7, Gravity Forms, or Elementor theme resets.                   */
.efss-validation-error {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 12px 0 0 0 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid #ef4444 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    animation: slideIn 0.3s ease !important;
}

.efss-validation-error p {
    color: #ef4444 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    margin: 4px 0 !important;
    line-height: 1.5 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.efss-validation-error p:first-child {
    margin-top: 0 !important;
}

.efss-validation-error p:last-child {
    margin-bottom: 0 !important;
}

/* ── Validation error — form-plugin scoped overrides ───────────────────────
   WPForms injects color:red on .wpforms-form label and p elements.
   GF injects .validation_message styles. These can bleed into our box
   if the selectors are broader than expected. Force our values explicitly.  */
.wpforms-form .efss-validation-error,
.gform_wrapper .efss-validation-error,
.wpcf7-form .efss-validation-error {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid #ef4444 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    color: #ef4444 !important;
}

.wpforms-form .efss-validation-error p,
.gform_wrapper .efss-validation-error p,
.wpcf7-form .efss-validation-error p {
    color: #ef4444 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    margin: 4px 0 !important;
    line-height: 1.5 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Phone banner inside plugin form wrappers */
.wpforms-form .efss-phone-banner,
.gform_wrapper .efss-phone-banner,
.wpcf7-form .efss-phone-banner {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ── Disabled submit button — covers all supported form plugins ─────────── */

/* Disabled submit button — covers Elementor, CF7, Gravity Forms, WPForms.
   Uses .efss-btn-disabled (JS class) + the native [disabled] attribute so
   both programmatic and attribute-driven states are styled consistently.    */
.elementor-button.efss-btn-disabled,
.elementor-button[disabled],
.wpcf7-submit.efss-btn-disabled,
.wpcf7-submit[disabled],
.wpcf7 input[type="submit"].efss-btn-disabled,
.wpcf7 input[type="submit"][disabled],
.gform_wrapper input[type="submit"].efss-btn-disabled,
.gform_wrapper input[type="submit"][disabled],
.gform_wrapper button[type="submit"].efss-btn-disabled,
.gform_wrapper button[type="submit"][disabled],
.wpforms-form input[type="submit"].efss-btn-disabled,
.wpforms-form input[type="submit"][disabled],
.wpforms-form button[type="submit"].efss-btn-disabled,
.wpforms-form button[type="submit"][disabled] {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(0.3) !important;
    transition: opacity 0.2s ease, filter 0.2s ease !important;
}

/* Smooth transition back when enabled */
.elementor-button:not(.efss-btn-disabled):not([disabled]),
.wpcf7-submit:not(.efss-btn-disabled):not([disabled]),
.wpcf7 input[type="submit"]:not(.efss-btn-disabled):not([disabled]),
.gform_wrapper input[type="submit"]:not(.efss-btn-disabled):not([disabled]),
.gform_wrapper button[type="submit"]:not(.efss-btn-disabled):not([disabled]),
.wpforms-form input[type="submit"]:not(.efss-btn-disabled):not([disabled]),
.wpforms-form button[type="submit"]:not(.efss-btn-disabled):not([disabled]) {
    transition: opacity 0.2s ease, filter 0.2s ease !important;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Phone / Call-Now banner ─────────────────────────────────────────────────
   Sits directly below .efss-validation-error as a sibling (not a child).
   Uses the exact same dark-pill aesthetic as .efss-protected-badge so the
   two elements form a coherent branded language at the bottom of the form.   */

.efss-phone-banner {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 8px 0 0 0 !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    animation: slideIn 0.3s ease !important;
}

/* "For immediate assistance, call" — dark pill identical to the badge */
.efss-phone-banner__label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 10px 16px !important;
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 9999px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    letter-spacing: 0.3px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

/* Phone handset icon — inline SVG, no extra HTTP request */
.efss-phone-banner__icon {
    display: inline-block !important;
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.15 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.06 1.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.09 8.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7a2 2 0 0 1 1.72 2.02z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
}

/* Phone number — gold accent pill, matches badge contrast ratio */
.efss-phone-banner__number {
    display: inline-flex !important;
    align-items: center !important;
    padding: 10px 20px !important;
    background: #1e293b !important;
    border: 1px solid rgba(253, 224, 71, 0.35) !important;
    border-radius: 9999px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #fde047 !important;
    letter-spacing: 0.8px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    position: relative !important;
    overflow: hidden !important;
    transition: background 0.2s ease, border-color 0.2s ease,
                color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}

/* Subtle shimmer sweep so the number catches the eye */
.efss-phone-banner__number::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 60% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(253, 224, 71, 0.12), transparent) !important;
    animation: efss-phone-shimmer 2.8s ease-in-out infinite !important;
    pointer-events: none !important;
}

.efss-phone-banner__number:hover {
    background: rgba(253, 224, 71, 0.10) !important;
    border-color: #fde047 !important;
    color: #fef08a !important;
    box-shadow: 0 0 14px rgba(253, 224, 71, 0.25) !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

@keyframes efss-phone-shimmer {
    0%   { left: -100%; }
    60%  { left: 160%; }
    100% { left: 160%; }
}
