/**
 * Site header redesign (Elementor header template 171).
 *
 * CSS override on top of Elementor-generated styles: sticky glass header
 * (translucent dark + backdrop blur), refined nav typography, and a unified
 * pill-button system (LOGIN solid green / REGISTER ghost white / DASHBOARD
 * ghost green). The Elementor template itself is untouched.
 * Loaded site-wide from wpforms-custom-module-dg/plugin.php.
 */

/* ==========================================================================
   Announcement bar (static, in-flow, scrolls away with the page)
   ========================================================================== */

#dg-announcement-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #65bc46;
    color: #0b0b10;
    font-family: Lato, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.25;
    padding: 8px 14px;
    text-align: center;
    text-decoration: none;
}

#dg-announcement-bar strong {
    font-weight: 900;
}

#dg-announcement-bar .dg-announce-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Short copy variant is mobile-only. */
#dg-announcement-bar .dg-announce-mid-short {
    display: none;
}

#dg-announcement-bar .dg-announce-cta {
    flex: 0 0 auto;
    background: #0b0b10;
    color: #ffffff;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
}

#dg-announcement-bar:hover .dg-announce-cta {
    background: #23232e;
    transform: translateX(2px);
}

/* Tablet and below: switch to the short copy so the bar stays one line. */
@media (max-width: 880px) {
    #dg-announcement-bar .dg-announce-mid-full {
        display: none;
    }

    #dg-announcement-bar .dg-announce-mid-short {
        display: inline;
    }
}

@media (max-width: 600px) {
    #dg-announcement-bar {
        font-size: 12px;
        gap: 9px;
        padding: 7px 10px;
    }

    #dg-announcement-bar .dg-announce-cta {
        font-size: 10px;
        padding: 4px 10px;
    }
}

/* Very small phones: drop the lead-in, keep just the offer. */
@media (max-width: 420px) {
    #dg-announcement-bar .dg-announce-lead {
        display: none;
    }
}

/* ==========================================================================
   Sticky floating capsule
   ========================================================================== */

.elementor.elementor-171 {
    position: sticky;
    top: 0;
    z-index: 980;
    /* The capsule floats over the page; the wrapper itself stays invisible. */
    background: transparent;
    pointer-events: none;
}

.elementor-171 .elementor-element.elementor-element-1a8a3982,
.elementor-171 .elementor-element.elementor-element-9a51809 {
    pointer-events: auto;
}

body.admin-bar .elementor.elementor-171 {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .elementor.elementor-171 {
        top: 46px;
    }
}

/* Dashboard pages already have their own tab bar (fingerprinted by its
   LOG OUT button), so the header scrolls away instead of floating.
   position:relative (not static) keeps the z-index active so the open
   hamburger dropdown still stacks above the dashboard tab bar. */
body:has(.elementor-section a.elementor-button[href*="/logout"]) .elementor.elementor-171 {
    position: relative;
}

/* ...and give the capsule breathing room above the dashboard tab bar. */
body:has(.elementor-section a.elementor-button[href*="/logout"]) .elementor-171 .elementor-element.elementor-element-1a8a3982 {
    margin-bottom: 60px !important;
}

@media (max-width: 767px) {
    body:has(.elementor-section a.elementor-button[href*="/logout"]) .elementor-171 .elementor-element.elementor-element-1a8a3982 {
        margin-bottom: 85px !important;
    }
}

.elementor-171 .elementor-element.elementor-element-1a8a3982 {
    width: min(1200px, calc(100% - 28px));
    margin: 8px auto 0 !important;
    padding: 3px 12px !important;
    border-radius: 999px;
    background: rgba(10, 10, 16, 0.72) !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* When the fixed promo marquee is present (it injects into the section
   above), push the capsule down enough to clear the ~30px bar when the
   header is stuck, with comfortable daylight between the two. */
.elementor-171:has(.elementor-element-9a51809 a) .elementor-element.elementor-element-1a8a3982 {
    margin-top: 44px !important;
}

/* Lay the capsule out as one flex row: logo / nav (flexible) / actions.
   min-height:0 overrides the template's 80px section min-height, which was
   inflating the bar. */
.elementor-171 .elementor-element-1a8a3982 > .elementor-container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    max-width: none;
    min-height: 0 !important;
}

.elementor-171 .elementor-element-1a8a3982 .elementor-column {
    width: auto !important;
    flex: 0 0 auto;
}

.elementor-171 .elementor-element-1a8a3982 .elementor-column.elementor-element-39267cd3 {
    flex: 1 1 auto;
    min-width: 0;
}

.elementor-171 .elementor-element-1a8a3982 .elementor-column > .elementor-widget-wrap {
    padding: 2px 6px !important;
    /* The template sets large per-breakpoint margins on these wraps
       (e.g. 25px each side on mobile), which starves the flex columns. */
    margin: 0 !important;
    display: flex;
    align-items: center;
    width: 100%;
}

.elementor-171 .elementor-element-1a8a3982 .elementor-widget {
    margin-bottom: 0 !important;
    width: 100%;
}

/* Compact logo. display:block removes the inline-image baseline gap that
   was pushing the logo slightly above the capsule's visual center. */
.elementor-171 .elementor-element-4ef9f2b9 img {
    display: block;
    max-height: 38px;
    width: auto;
}

.elementor-171 .elementor-element-4ef9f2b9 .elementor-widget-container {
    line-height: 0;
}

/* Center the nav inside its flexible column */
.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--main .elementor-nav-menu {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
}

/* Tighter vertical rhythm on the nav links so they don't inflate the bar */
.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--main a.elementor-item {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* ==========================================================================
   Primary nav links
   ========================================================================== */

.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--main a.elementor-item {
    font-family: Lato, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    color: #c9c9d1 !important;
    transition: color 0.15s ease;
}

.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--main a.elementor-item:hover,
.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--main a.elementor-item:focus-visible {
    color: #ffffff !important;
}

.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--main .current-menu-item > a.elementor-item,
.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--main a.elementor-item.elementor-item-active {
    color: #65bc46 !important;
}

/* Pointer underline animation in brand green. */
.elementor-171 .elementor-element-5d6db40e .e--pointer-underline .elementor-item:before,
.elementor-171 .elementor-element-5d6db40e .e--pointer-underline .elementor-item:after {
    background-color: #65bc46 !important;
    height: 2px !important;
}

/* ==========================================================================
   Header buttons — shared pill base
   ========================================================================== */

.elementor-171 .elementor-element-83792c1 a.elementor-button,
.elementor-171 .elementor-element-11d0a19 a.elementor-button,
.elementor-171 .elementor-element-e451405 a.elementor-button {
    border-radius: 999px !important;
    font-family: Lato, sans-serif !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    line-height: 1 !important;
    padding: 9px 18px !important;
    text-shadow: none !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* LOGIN — solid green (primary) */
.elementor-171 .elementor-element-83792c1 a.elementor-button {
    background: #65bc46 !important;
    color: #0b0b10 !important;
    border: 1px solid #65bc46 !important;
    box-shadow: none !important;
}

.elementor-171 .elementor-element-83792c1 a.elementor-button:hover,
.elementor-171 .elementor-element-83792c1 a.elementor-button:focus-visible {
    background: #71ca52 !important;
    border-color: #71ca52 !important;
    color: #0b0b10 !important;
    box-shadow: 0 2px 14px rgba(101, 188, 70, 0.4) !important;
}

/* REGISTER — ghost white (secondary) */
.elementor-171 .elementor-element-11d0a19 a.elementor-button {
    background: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: none !important;
}

.elementor-171 .elementor-element-11d0a19 a.elementor-button:hover,
.elementor-171 .elementor-element-11d0a19 a.elementor-button:focus-visible {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #0b0b10 !important;
}

/* DASHBOARD (logged in) — ghost green */
.elementor-171 .elementor-element-e451405 a.elementor-button {
    background: rgba(101, 188, 70, 0.10) !important;
    color: #65bc46 !important;
    border: 1px solid rgba(101, 188, 70, 0.6) !important;
    box-shadow: none !important;
}

.elementor-171 .elementor-element-e451405 a.elementor-button:hover,
.elementor-171 .elementor-element-e451405 a.elementor-button:focus-visible {
    background: #65bc46 !important;
    border-color: #65bc46 !important;
    color: #0b0b10 !important;
    box-shadow: 0 2px 14px rgba(101, 188, 70, 0.4) !important;
}

/* ==========================================================================
   Mobile menu — dark dropdown panel
   ========================================================================== */

.elementor-171 .elementor-menu-toggle {
    color: #ffffff !important;
    background: transparent !important;
}

.elementor-171 .elementor-menu-toggle.elementor-active,
.elementor-171 .elementor-menu-toggle:hover {
    color: #65bc46 !important;
}

.elementor-171 .elementor-element-5d6db40e nav.elementor-nav-menu--dropdown {
    background-color: rgba(10, 10, 15, 0.97) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    margin-top: 10px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--dropdown a.elementor-item {
    font-family: Lato, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #d6d6dd !important;
}

.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--dropdown a.elementor-item:hover,
.elementor-171 .elementor-element-5d6db40e .elementor-nav-menu--dropdown .current-menu-item > a.elementor-item {
    background: rgba(101, 188, 70, 0.10) !important;
    color: #65bc46 !important;
}

/* ==========================================================================
   Tablet & mobile (hamburger range) — logo / actions spanning the middle /
   hamburger pinned right
   ========================================================================== */

@media (max-width: 1024px) {
    /* Logo stays first, hugging the left. */
    .elementor-171 .elementor-element-1a8a3982 .elementor-column.elementor-element-31f30eec {
        order: 0;
        flex: 0 0 auto;
    }

    /* Action buttons take the middle and share it equally. */
    .elementor-171 .elementor-element-1a8a3982 .elementor-column.elementor-element-3e90c03,
    .elementor-171 .elementor-element-1a8a3982 .elementor-column.elementor-element-c92dd63,
    .elementor-171 .elementor-element-1a8a3982 .elementor-column.elementor-element-48f1b1b {
        order: 1;
        flex: 1 1 0 !important;
        min-width: 0;
    }

    /* Hamburger pinned to the right edge. margin-left:auto keeps it pinned
       even when the middle action buttons are hidden (e.g. the DASHBOARD
       button is suppressed on /dashboard pages themselves). */
    .elementor-171 .elementor-element-1a8a3982 .elementor-column.elementor-element-39267cd3 {
        order: 2;
        flex: 0 0 auto !important;
        margin-left: auto;
    }

    .elementor-171 .elementor-element-1a8a3982 .elementor-element-39267cd3 > .elementor-widget-wrap {
        padding: 4px 2px 4px 0 !important;
        justify-content: flex-end;
    }

    .elementor-171 .elementor-menu-toggle {
        margin: 0 !important;
        padding: 8px !important;
    }

    /* Stretch the pills across their share of the middle (the whole
       widget-container chain must go wide, not just the anchor). */
    .elementor-171 .elementor-element-83792c1,
    .elementor-171 .elementor-element-11d0a19,
    .elementor-171 .elementor-element-e451405,
    .elementor-171 .elementor-element-83792c1 .elementor-widget-container,
    .elementor-171 .elementor-element-11d0a19 .elementor-widget-container,
    .elementor-171 .elementor-element-e451405 .elementor-widget-container,
    .elementor-171 .elementor-element-83792c1 .elementor-button-wrapper,
    .elementor-171 .elementor-element-11d0a19 .elementor-button-wrapper,
    .elementor-171 .elementor-element-e451405 .elementor-button-wrapper {
        width: 100% !important;
        display: block;
    }

    .elementor-171 .elementor-element-83792c1 a.elementor-button,
    .elementor-171 .elementor-element-11d0a19 a.elementor-button,
    .elementor-171 .elementor-element-e451405 a.elementor-button {
        display: flex;
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Small screens — tighter capsule
   ========================================================================== */

@media (max-width: 767px) {
    .elementor-171 .elementor-element.elementor-element-1a8a3982 {
        width: calc(100% - 16px);
        margin-top: 6px !important;
        padding: 4px 8px !important;
    }

    .elementor-171:has(.elementor-element-9a51809 a) .elementor-element.elementor-element-1a8a3982 {
        margin-top: 36px !important;
    }

    .elementor-171 .elementor-element-1a8a3982 > .elementor-container {
        gap: 4px;
    }

    .elementor-171 .elementor-element-1a8a3982 .elementor-column > .elementor-widget-wrap {
        padding: 4px 2px !important;
    }

    .elementor-171 .elementor-element-4ef9f2b9 img {
        max-height: 38px;
    }

    .elementor-171 .elementor-element-83792c1 a.elementor-button,
    .elementor-171 .elementor-element-11d0a19 a.elementor-button,
    .elementor-171 .elementor-element-e451405 a.elementor-button {
        font-size: 11px !important;
        padding: 10px 8px !important;
        letter-spacing: 0.05em !important;
    }
}
