/*
 * 26horses cookie consent UI v6
 * Compact themed preference card + persistent settings tab.
 */

#cc-overlay,
.cc-overlay {
    display: none !important;
}

:root {
    --cookie-bg: rgba(4, 13, 24, 0.985);
    --cookie-bg-top: rgba(14, 39, 63, 0.985);
    --cookie-border: rgba(91, 184, 255, 0.42);
    --cookie-border-strong: rgba(109, 204, 255, 0.72);
    --cookie-text: #eef8ff;
    --cookie-body: #bfd3e2;
    --cookie-muted: #819db0;
    --cookie-accent: #8fd8ff;
    --cookie-green: #1f9d83;
    --cookie-green-light: #3fc5a5;
    --cookie-green-dark: #126b60;
    --cookie-green-deep: #0a403b;
}

/****************************************
   COOKIE PREFERENCE CARD
 ****************************************/

#horses-cookie-banner {
    position: fixed !important;
    left: calc(14px + env(safe-area-inset-left));
    bottom: calc(66px + env(safe-area-inset-bottom));
    z-index: 2147483646;

    width: min(620px, calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    margin: 0;
    padding: 0;

    color: var(--cookie-text);
    background:
        linear-gradient(180deg, var(--cookie-bg-top), var(--cookie-bg));

    border: 1px solid var(--cookie-border);
    border-radius: 16px 16px 16px 5px;

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.56),
        0 0 28px rgba(45, 145, 211, 0.07),
        inset 0 1px 0 rgba(185, 230, 255, 0.07);

    overflow: hidden;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

#horses-cookie-banner::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(104, 208, 255, 0.76),
        transparent
    );
    opacity: 0.7;
    pointer-events: none;
}

#horses-cookie-banner[hidden] {
    display: none !important;
}

.horses-cookie-banner-inner {
    width: 100%;
    padding: 20px 22px 21px;
}

.horses-cookie-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

.horses-cookie-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.horses-cookie-logo-wrap {
    width: 28px;
    height: 18px;
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

.horses-cookie-logo {
    display: block;
    width: auto;
    height: 18px;
    max-width: none;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 0 5px rgba(74, 184, 255, 0.12));
}

.horses-cookie-heading {
    min-width: 0;
    padding-top: 0;
}

.horses-cookie-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--cookie-accent);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.horses-cookie-title {
    margin: 0;
    color: #ffffff;
    font-size: 1.16rem;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.005em;
}

.horses-cookie-close {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    padding: 0;

    border: 1px solid rgba(74, 201, 121, 0.38);
    border-radius: 9px;

    color: #d9f7e4;
    background: linear-gradient(180deg, rgba(25, 105, 59, 0.76), rgba(10, 65, 38, 0.84));
    cursor: pointer;

    font: inherit;
    font-size: 1.2rem;
    line-height: 1;

    transition:
        border-color 140ms ease,
        color 140ms ease,
        background 140ms ease,
        transform 140ms ease;
}

.horses-cookie-close:hover,
.horses-cookie-close:focus-visible {
    color: #ffffff;
    border-color: rgba(89, 224, 140, 0.82);
    background: linear-gradient(180deg, rgba(39, 145, 79, 0.90), rgba(13, 82, 47, 0.94));
    transform: translateY(-1px);
}

.horses-cookie-content {
    padding: 16px 17px;
    border: 1px solid rgba(109, 175, 214, 0.15);
    border-radius: 12px;
    background:
        linear-gradient(
            180deg,
            rgba(15, 37, 56, 0.50),
            rgba(7, 23, 36, 0.46)
        );
}

.horses-cookie-description {
    margin: 0;
    color: var(--cookie-body);
    font-size: 0.90rem;
    font-weight: 400;
    line-height: 1.58;
}

.horses-cookie-policy-link {
    color: #b4e8ff;
    font-weight: 700;
    text-underline-offset: 3px;
}

.horses-cookie-policy-link:hover,
.horses-cookie-policy-link:focus-visible {
    color: #ffffff;
}

.horses-cookie-note {
    margin: 9px 0 0;
    color: var(--cookie-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

/****************************************
   BUTTONS
 ****************************************/

.horses-cookie-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 15px;
}

.horses-cookie-button {
    min-height: 45px;
    flex: 1 1 0;
    padding: 10px 15px;

    border: 1px solid rgba(84, 217, 138, 0.68);
    border-radius: 10px;

    color: #ffffff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.012em;
    text-align: center;

    cursor: pointer;
    background:
        linear-gradient(
            180deg,
            rgba(44, 174, 94, 0.96),
            rgba(18, 105, 59, 0.98)
        );

    box-shadow:
        0 7px 18px rgba(6, 61, 33, 0.22),
        inset 0 1px 0 rgba(190, 255, 214, 0.16);

    transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease;
}

.horses-cookie-button:hover,
.horses-cookie-button:focus-visible {
    border-color: rgba(136, 246, 176, 0.94);
    background:
        linear-gradient(
            180deg,
            rgba(60, 198, 111, 0.98),
            rgba(23, 125, 69, 0.99)
        );
    box-shadow:
        0 9px 22px rgba(7, 74, 39, 0.30),
        inset 0 1px 0 rgba(213, 255, 228, 0.20);
    transform: translateY(-1px);
}

.horses-cookie-button-secondary {
    border-color: rgba(76, 184, 116, 0.46);
    color: #e0f7e8;
    background: linear-gradient(180deg, rgba(20, 92, 53, 0.82), rgba(8, 55, 32, 0.92));
}

.horses-cookie-button-secondary:hover,
.horses-cookie-button-secondary:focus-visible {
    border-color: rgba(104, 221, 147, 0.78);
    background: linear-gradient(180deg, rgba(29, 121, 68, 0.92), rgba(11, 70, 40, 0.96));
}

.horses-cookie-button:focus-visible,
.horses-cookie-close:focus-visible,
#horses-cookie-settings:focus-visible,
.horses-cookie-policy-link:focus-visible {
    outline: 3px solid rgba(84, 217, 138, 0.34);
    outline-offset: 3px;
}

/****************************************
   SETTINGS TAB
 ****************************************/

#horses-cookie-settings {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left));
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 2147483645;

    min-height: 42px;
    padding: 11px 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(84, 217, 138, 0.66);
    border-radius: 10px 10px 10px 3px;

    color: #f2fff7;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.025em;

    cursor: pointer;
    background:
        linear-gradient(
            180deg,
            rgba(42, 169, 91, 0.98),
            rgba(15, 92, 51, 0.99)
        );

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.38),
        0 4px 14px rgba(5, 71, 36, 0.22),
        inset 0 1px 0 rgba(207, 255, 225, 0.14);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition:
        transform 150ms ease,
        border-color 150ms ease,
        color 150ms ease,
        background 150ms ease,
        box-shadow 150ms ease;
}

#horses-cookie-settings::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: -1px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(120, 239, 163, 0.72),
        transparent
    );
    opacity: 0.55;
    pointer-events: none;
}

.horses-cookie-settings-label {
    transform: none;
}

#horses-cookie-settings:hover,
#horses-cookie-settings:focus-visible {
    border-color: rgba(128, 239, 170, 0.88);
    color: #ffffff;
    background:
        linear-gradient(
            180deg,
            rgba(58, 192, 107, 0.99),
            rgba(20, 116, 63, 0.99)
        );
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.38),
        0 7px 20px rgba(5, 78, 40, 0.28),
        inset 0 1px 0 rgba(221, 255, 233, 0.17);
    transform: translateY(-1px);
}

#horses-cookie-settings[hidden] {
    display: none !important;
}

/****************************************
   RESPONSIVE
 ****************************************/

@media (max-width: 680px) {
    #horses-cookie-banner {
        left: calc(10px + env(safe-area-inset-left));
        right: calc(10px + env(safe-area-inset-right));
        bottom: calc(62px + env(safe-area-inset-bottom));
        width: auto;
        border-radius: 14px 14px 14px 4px;
    }

    .horses-cookie-banner-inner {
        padding: 17px 16px 16px;
    }

    .horses-cookie-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .horses-cookie-brand {
        gap: 10px;
    }

    .horses-cookie-logo-wrap {
        width: 25px;
        height: 16px;
        flex-basis: 25px;
    }

    .horses-cookie-logo {
        height: 16px;
    }

    .horses-cookie-eyebrow {
        font-size: 0.60rem;
    }

    .horses-cookie-title {
        font-size: 1.02rem;
    }

    .horses-cookie-content {
        padding: 13px 14px;
    }

    .horses-cookie-description {
        font-size: 0.84rem;
        line-height: 1.5;
    }

    .horses-cookie-note {
        font-size: 0.70rem;
    }

    .horses-cookie-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 12px;
    }

    .horses-cookie-button {
        width: 100%;
        min-height: 45px;
    }
}

@media (orientation: landscape) and (max-height: 560px) {
    #horses-cookie-banner {
        bottom: calc(52px + env(safe-area-inset-bottom));
        width: min(700px, calc(100vw - 24px));
    }

    .horses-cookie-banner-inner {
        padding: 12px 14px 13px;
    }

    .horses-cookie-header {
        margin-bottom: 9px;
    }

    .horses-cookie-logo-wrap {
        width: 22px;
        height: 14px;
        flex-basis: 22px;
    }

    .horses-cookie-logo {
        height: 14px;
    }

    .horses-cookie-content {
        padding: 10px 12px;
    }

    .horses-cookie-description {
        font-size: 0.76rem;
        line-height: 1.4;
    }

    .horses-cookie-note {
        display: none;
    }

    .horses-cookie-actions {
        margin-top: 9px;
    }

    .horses-cookie-button {
        min-height: 38px;
        padding: 8px 10px;
        font-size: 0.78rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .horses-cookie-button,
    .horses-cookie-close,
    #horses-cookie-settings {
        transition: none;
    }
}

/*
 * v5 hardening: these selectors intentionally win over generic site/browser
 * button and image rules. The cookie CSS now loads from /style so nginx can
 * serve it from the public document root.
 */
.horses-cookie-logo-wrap {
    width: 288px !important;
    height: 90px !important;
    flex: 0 0 288px !important;
    overflow: hidden !important;
}

.horses-cookie-logo {
    display: block !important;
    width: 288px !important;
    height: auto !important;
    max-width: 288px !important;
    max-height: 90px !important;
    object-fit: contain !important;
    object-position: left center !important;
}

#horses-cookie-settings {
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    min-height: 44px !important;
    padding: 12px 20px !important;
    border: 1px solid rgba(77, 194, 170, 0.72) !important;
    border-radius: 10px 10px 10px 4px !important;
    color: #f4fff8 !important;
    background: linear-gradient(180deg, #249c86 0%, #126b60 100%) !important;
    box-shadow: 0 9px 24px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.18) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .015em !important;
}

#horses-cookie-settings:hover,
#horses-cookie-settings:focus-visible {
    color: #ffffff !important;
    border-color: rgba(101, 226, 199, 0.95) !important;
    background: linear-gradient(180deg, #32b69a 0%, #178274 100%) !important;
}

#horses-cookie-banner .horses-cookie-button,
#horses-cookie-banner .horses-cookie-close {
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

#horses-cookie-banner .horses-cookie-button {
    min-height: 46px !important;
    padding: 12px 18px !important;
    border: 1px solid rgba(77, 194, 170, 0.72) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    background: linear-gradient(180deg, #249c86 0%, #126b60 100%) !important;
    box-shadow: 0 7px 18px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.16) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}

#horses-cookie-banner .horses-cookie-button:hover,
#horses-cookie-banner .horses-cookie-button:focus-visible {
    border-color: rgba(101,226,199,.95) !important;
    background: linear-gradient(180deg, #32b69a 0%, #178274 100%) !important;
}

#horses-cookie-banner .horses-cookie-button-secondary {
    color: #e7fffa !important;
    border-color: rgba(61, 153, 137, .60) !important;
    background: linear-gradient(180deg, #155e55 0%, #0b3f3c 100%) !important;
}

#horses-cookie-banner .horses-cookie-button-secondary:hover,
#horses-cookie-banner .horses-cookie-button-secondary:focus-visible {
    border-color: rgba(87, 202, 180, .84) !important;
    background: linear-gradient(180deg, #1b776b 0%, #10554f 100%) !important;
}

#horses-cookie-banner .horses-cookie-close {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border: 1px solid rgba(68, 171, 153, .68) !important;
    border-radius: 9px !important;
    color: #effffc !important;
    background: linear-gradient(180deg, #1c7569 0%, #0e4a46 100%) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

@media (max-width: 680px) {
    .horses-cookie-logo-wrap {
        width: 150px !important;
        height: 47px !important;
        flex-basis: 150px !important;
    }
    .horses-cookie-logo {
        width: 150px !important;
        max-width: 150px !important;
        max-height: 47px !important;
    }
}


/* v6 final theme overrides: larger wordmark + muted teal/emerald controls */
#horses-cookie-banner .horses-cookie-close:hover,
#horses-cookie-banner .horses-cookie-close:focus-visible {
    border-color: rgba(104, 224, 200, .90) !important;
    background: linear-gradient(180deg, #259481 0%, #12645c 100%) !important;
    color: #ffffff !important;
}

.horses-cookie-button:focus-visible,
.horses-cookie-close:focus-visible,
#horses-cookie-settings:focus-visible {
    outline-color: rgba(64, 197, 168, .34) !important;
}


/****************************************
   FOOTER COOKIE SETTINGS TRIGGER
   Matches the footer social button treatment.
 ****************************************/

#horses-cookie-banner {
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
}

#horses-cookie-settings.site-footer-cookie-settings {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 0 !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 9px 16px !important;

    appearance: none !important;
    -webkit-appearance: none !important;

    border: 1px solid rgba(91, 184, 255, 0.28) !important;
    border-radius: 11px !important;

    color: #ffffff !important;
    font: inherit !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;

    cursor: pointer !important;
    background: rgba(40, 94, 135, 0.12) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        transform 160ms ease !important;
}

#horses-cookie-settings.site-footer-cookie-settings::after {
    content: none !important;
    display: none !important;
}

#horses-cookie-settings.site-footer-cookie-settings:hover,
#horses-cookie-settings.site-footer-cookie-settings:focus-visible {
    border-color: rgba(91, 184, 255, 0.72) !important;
    color: #ffffff !important;
    background: rgba(48, 119, 168, 0.24) !important;
    box-shadow: none !important;
    transform: translateY(-1px) !important;
}

#horses-cookie-settings.site-footer-cookie-settings:focus-visible {
    outline: 2px solid rgba(91, 184, 255, 0.42) !important;
    outline-offset: 2px !important;
}

#horses-cookie-settings.site-footer-cookie-settings[hidden] {
    display: none !important;
}

/* Fallback only for a page that somehow skips the shared footer. */
#horses-cookie-settings.horses-cookie-settings-fallback {
    position: fixed !important;
    left: calc(12px + env(safe-area-inset-left)) !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    z-index: 2147483645 !important;
}

@media (max-width: 680px) {
    #horses-cookie-banner {
        bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    }
}


/*
 * v7: popup controls use the exact same visual language as the
 * footer Cookie settings control. No separate green button palette.
 */
#horses-cookie-banner .horses-cookie-button,
#horses-cookie-banner .horses-cookie-button-secondary,
#horses-cookie-banner .horses-cookie-close {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 1px solid rgba(91, 184, 255, 0.28) !important;
    color: #ffffff !important;
    background: rgba(40, 94, 135, 0.12) !important;
    box-shadow: none !important;
    font-family: inherit !important;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        transform 160ms ease !important;
}

#horses-cookie-banner .horses-cookie-button,
#horses-cookie-banner .horses-cookie-button-secondary {
    min-height: 44px !important;
    padding: 10px 16px !important;
    border-radius: 11px !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
}

#horses-cookie-banner .horses-cookie-close {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 11px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

#horses-cookie-banner .horses-cookie-button:hover,
#horses-cookie-banner .horses-cookie-button:focus-visible,
#horses-cookie-banner .horses-cookie-button-secondary:hover,
#horses-cookie-banner .horses-cookie-button-secondary:focus-visible,
#horses-cookie-banner .horses-cookie-close:hover,
#horses-cookie-banner .horses-cookie-close:focus-visible {
    border-color: rgba(91, 184, 255, 0.72) !important;
    color: #ffffff !important;
    background: rgba(48, 119, 168, 0.24) !important;
    box-shadow: none !important;
    transform: translateY(-1px) !important;
}

#horses-cookie-banner .horses-cookie-button:focus-visible,
#horses-cookie-banner .horses-cookie-button-secondary:focus-visible,
#horses-cookie-banner .horses-cookie-close:focus-visible {
    outline: 2px solid rgba(91, 184, 255, 0.42) !important;
    outline-offset: 2px !important;
}
