/**
 * Voice Theme Compatibility CSS
 * Maps Voice theme CSS classes to sid-financial-theme styles.
 * Also includes funnel mode styling and lead capture form fixes.
 */

/* ==========================================================================
   FUNNEL MODE - Minimal Header
   ========================================================================== */

.sid-funnel-header {
    background: #1e3a5f;
    padding: 0.75rem 1rem;
    text-align: center;
}

.sid-funnel-header__container {
    max-width: 1200px;
    margin: 0 auto;
}

.sid-funnel-header__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #ffffff;
}

.sid-funnel-header__logo-icon {
    flex-shrink: 0;
}

.sid-funnel-header__logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Container & Layout */
#content.container.site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.vce-sid-none #primary { width: 100%; }
.vce-main-content { width: 100%; }

/* Main Box Components */
.main-box {
    background: var(--sid-bg-card, #ffffff);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.main-box-single { padding: 0; }
.main-box-title {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    margin: 0;
    border-bottom: 1px solid var(--sid-border-light, #e5e7eb);
}
.main-box-inside { padding: 1rem 1.5rem; }

/* Article Styles */
article.vce-single {
    background: var(--sid-bg-card, #ffffff);
    border-radius: 8px;
    overflow: hidden;
}
.vce-single .entry-header { padding: 1.5rem 1.5rem 1rem; }
.vce-single .entry-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}
.vce-single .entry-meta {
    font-size: 0.875rem;
    color: var(--sid-text-muted, #6b7280);
}
.vce-single .entry-content {
    padding: 0 1.5rem 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
}
.vce-single .entry-content p { margin-bottom: 1rem; }
.vce-single .entry-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sid-border-light, #e5e7eb);
}

/* Meta Elements */
.meta-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--sid-primary, #2563eb);
    margin-bottom: 0.5rem;
}
.meta-date::after { content: " \2022 "; margin: 0 0.25rem; }
.meta-image { margin: 0 0 1.5rem; }
.meta-image img { width: 100%; height: auto; display: block; }
.meta-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.meta-tags a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--sid-bg-subtle, #f3f4f6);
    border-radius: 999px;
    font-size: 0.75rem;
    text-decoration: none;
}

/* Related Posts */
.vce-related-box { margin-top: 2rem; }
.vce-related-box .main-box-inside {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .vce-single .entry-title { font-size: 1.5rem; }
    .vce-single .entry-header,
    .vce-single .entry-content,
    .vce-single .entry-footer { padding-left: 1rem; padding-right: 1rem; }
}

/* ==========================================================================
   FUNNEL PAGE - Content & Form Styling
   Only applies to main content, NOT popups
   ========================================================================== */

/* Page title centering - only in main content, not popups */
.elementor:not(.elementor-location-popup) .elementor-widget-text-editor h1,
.elementor:not(.elementor-location-popup) .elementor-widget-text-editor h2,
.elementor:not(.elementor-location-popup) h1.elementor-heading-title,
.elementor:not(.elementor-location-popup) h2.elementor-heading-title {
    text-align: center !important;
}

/* Content container - only main page content */
.elementor:not(.elementor-location-popup) .elementor-section:not(.elementor-inner-section) > .elementor-container {
    max-width: 700px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Lead capture form - the form uses class "description" */
.elementor:not(.elementor-location-popup) form.description {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    max-width: 100% !important;
}

/* All form inputs - consistent full width */
.elementor:not(.elementor-location-popup) form.description input[type="text"],
.elementor:not(.elementor-location-popup) form.description input[type="email"],
.elementor:not(.elementor-location-popup) form.description input[type="tel"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    margin: 0 !important;
}

/* International tel input wrapper (iti library) - Global fix */
.iti {
    width: 100% !important;
    display: block !important;
}

.iti input,
.iti input[type="tel"] {
    width: 100% !important;
    padding-left: 60px !important;
}

/* Elementor-specific iti overrides */
.elementor:not(.elementor-location-popup) form.description .iti {
    width: 100% !important;
    display: block !important;
}

.elementor:not(.elementor-location-popup) form.description .iti input {
    width: 100% !important;
    padding-left: 60px !important;
}

/* Submit button - full width */
.elementor:not(.elementor-location-popup) form.description input[type="submit"],
.elementor:not(.elementor-location-popup) form.description button[type="submit"] {
    width: 100% !important;
    padding: 14px 24px !important;
    background: #1e3a5f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin-top: 4px !important;
}

.elementor:not(.elementor-location-popup) form.description input[type="submit"]:hover,
.elementor:not(.elementor-location-popup) form.description button[type="submit"]:hover {
    background: #15293f !important;
}

/* Reset any flex row behavior on form children */
.elementor:not(.elementor-location-popup) form.description > div,
.elementor:not(.elementor-location-popup) form.description > span {
    width: 100% !important;
    display: block !important;
}

/* ==========================================================================
   WordPress Admin Bar Fix
   Adjusts sticky/fixed headers when WP admin bar is present
   ========================================================================== */

body.admin-bar .elementor-location-header,
body.admin-bar .elementor-sticky--active,
body.admin-bar .elementor-sticky,
body.admin-bar [data-elementor-type="header"],
body.admin-bar header.elementor-location-header {
    top: 32px !important;
    margin-top: 0 !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .elementor-location-header,
    body.admin-bar .elementor-sticky--active,
    body.admin-bar .elementor-sticky,
    body.admin-bar [data-elementor-type="header"],
    body.admin-bar header.elementor-location-header {
        top: 46px !important;
    }
}
