/*
 * Parkland Natural Health — CookieYes legacy style v3.1
 * Based on the visual values of parkland-gtm(6).php (v1.0.1).
 * CSS ONLY — does not inject GTM or change consent behaviour.
 * Replaces the ENTIRE earlier CookieYes v1/v2 Additional CSS block.
 */

/* Floating panel: desktop positioning from the old Parkland plugin. */
.cky-consent-container {
    position: fixed !important;
    z-index: 999999 !important;
    top: auto !important;
    bottom: 20px !important;
    left: 20px !important;
    right: 20px !important;
    width: auto !important;
    max-width: 1050px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.cky-consent-container .cky-consent-bar {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    padding: 14px 16px !important;
    background: #ffffff !important;
    color: #222222 !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16) !important;
    font-family: inherit !important;
    /* The whole panel can scroll on very short screens, never only the text. */
    max-height: calc(100vh - 40px) !important;
    max-height: calc(100dvh - 40px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* The legacy banner had no separate visible heading. Keep it for screen readers. */
.cky-consent-container .cky-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    clip-path: inset(50%) !important;
}

/* Important fix: undo CookieYes's internal scrolling text box. */
.cky-consent-container .cky-notice-des,
.cky-consent-container .cky-notice-des-wrapper,
.cky-consent-container .cky-notice-group {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.cky-consent-container .cky-notice-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    width: 100% !important;
}

.cky-consent-container .cky-notice-des-wrapper,
.cky-consent-container .cky-notice-des {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #222222 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
}

.cky-consent-container .cky-notice-des p {
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.cky-consent-container .cky-notice-des a {
    color: #245d37 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

.cky-consent-container .cky-notice-btn-wrapper {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 8px !important;
}

.cky-consent-container .cky-notice-btn-wrapper .cky-btn {
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 8px 13px !important;
    border: 1px solid #347a4a !important;
    border-radius: 5px !important;
    background: #ffffff !important;
    color: #245d37 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

.cky-consent-container .cky-notice-btn-wrapper .cky-btn:hover {
    background: #f1f7f3 !important;
}

/* Keep the legacy primary green action. */
.cky-consent-container .cky-notice-btn-wrapper .cky-btn-accept {
    background: #347a4a !important;
    color: #ffffff !important;
}
.cky-consent-container .cky-notice-btn-wrapper .cky-btn-accept:hover {
    background: #28613a !important;
}

/* Legacy order: Reject, middle action, Accept. */
.cky-consent-container .cky-btn-reject { order: 1 !important; }
.cky-consent-container .cky-btn-customize { order: 2 !important; }
.cky-consent-container .cky-btn-accept { order: 3 !important; }

.cky-consent-container .cky-btn:focus-visible,
.cky-consent-container .cky-notice-des a:focus-visible {
    outline: 2px solid #245d37 !important;
    outline-offset: 2px !important;
}

/* Tablet and mobile: content above three full-height, side-by-side actions. */
@media (max-width: 860px) {
    .cky-consent-container {
        top: auto !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        max-width: none !important;
    }
    .cky-consent-container .cky-consent-bar {
        padding: 12px 14px !important;
        max-height: calc(100vh - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
    }
    .cky-consent-container .cky-notice-group {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 10px !important;
    }
    .cky-consent-container .cky-notice-des-wrapper,
    .cky-consent-container .cky-notice-des {
        flex: 0 1 auto !important;
        width: 100% !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
    }
    .cky-consent-container .cky-notice-btn-wrapper {
        display: flex !important;
        flex: 0 0 auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: stretch !important;
        width: 100% !important;
        margin: 0 !important;
        gap: 6px !important;
    }
    .cky-consent-container .cky-notice-btn-wrapper .cky-btn {
        flex: 1 1 0 !important;
        width: 0 !important;
        min-width: 0 !important;
        min-height: 44px !important;
        padding: 8px 4px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
    }
}

/* Very narrow phones: retain full labels without squeezing content. */
@media (max-width: 350px) {
    .cky-consent-container .cky-consent-bar {
        padding: 10px !important;
    }
    .cky-consent-container .cky-notice-btn-wrapper {
        gap: 4px !important;
    }
    .cky-consent-container .cky-notice-btn-wrapper .cky-btn {
        padding: 7px 2px !important;
        font-size: 11px !important;
    }
}

/* Leave CookieYes's small revisit/settings control functional. */
.cky-btn-revisit-wrapper {
    left: 12px !important;
    bottom: 12px !important;
    background: #ffffff !important;
    border: 1px solid #d0d0d0 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Parkland CookieYes v3.1 — Revisit button fix */

.cky-btn-revisit-wrapper {
    width: auto !important;
    height: auto !important;
    left: 12px !important;
    bottom: 12px !important;
    background: #ffffff !important;
    border: 1px solid #d0d0d0 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.cky-btn-revisit-wrapper .cky-btn-revisit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-height: 36px !important;
    padding: 6px 10px !important;
    background: transparent !important;
    color: #245d37 !important;
    border-radius: 4px !important;
}

/* Replace the icon with the original text label */
.cky-btn-revisit-wrapper .cky-btn-revisit svg,
.cky-btn-revisit-wrapper .cky-btn-revisit img {
    display: none !important;
}

.cky-btn-revisit-wrapper .cky-btn-revisit::after {
    content: "Cookie settings" !important;
    display: inline-block !important;
    color: #245d37 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

.cky-btn-revisit-wrapper .cky-btn-revisit:focus-visible {
    outline: 2px solid #245d37 !important;
    outline-offset: 2px !important;
}
