/*
 * Bellwether Event – CookieYes simplified skin v1.2
 * Cel: maksymalnie prosty, spójny z marką Bellwether, bez kombinowania z mechaniką zgód.
 */

:root {
    --bw-cookie-bg: #fffdf9;
    --bw-cookie-bg-soft: #f8f4ee;
    --bw-cookie-text: #1c1a18;
    --bw-cookie-muted: #6f675f;
    --bw-cookie-line: #e4d8c8;
    --bw-cookie-gold: #c89a49;
    --bw-cookie-gold-dark: #a9782d;
    --bw-cookie-shadow: 0 18px 55px rgba(35, 28, 19, 0.16);
}

body .cky-consent-container,
body .cky-modal,
body .cky-btn-revisit-wrapper {
    font-family: Montserrat, Arial, Helvetica, sans-serif !important;
    letter-spacing: 0 !important;
}

/* =========================
   BANNER
   ========================= */
body .cky-consent-container {
    width: min(390px, calc(100vw - 24px)) !important;
    left: auto !important;
    right: 16px !important;
    bottom: 16px !important;
    top: auto !important;
    transform: none !important;
    z-index: 99999999 !important;
}

body .cky-consent-container .cky-consent-bar {
    box-sizing: border-box !important;
    padding: 20px !important;
    background: var(--bw-cookie-bg) !important;
    border: 1px solid var(--bw-cookie-line) !important;
    border-radius: 16px !important;
    box-shadow: var(--bw-cookie-shadow) !important;
}

body .cky-consent-container .cky-notice,
body .cky-consent-container .cky-notice-group {
    color: var(--bw-cookie-text) !important;
}

body .cky-consent-container .cky-title {
    margin: 0 28px 10px 0 !important;
    color: var(--bw-cookie-text) !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.18 !important;
}

body .cky-consent-container .cky-notice-des,
body .cky-consent-container .cky-notice-des p,
body .cky-consent-container .cky-notice-des * {
    color: var(--bw-cookie-muted) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.58 !important;
}

body .cky-consent-container .cky-notice-des p {
    margin: 0 0 8px !important;
}

body .cky-consent-container .cky-notice-des p:last-child {
    margin-bottom: 0 !important;
}

body .cky-consent-container .cky-notice-des a,
body .cky-consent-container .cky-notice-des a.cky-policy,
body .cky-consent-container .cky-notice-des button.cky-policy {
    color: var(--bw-cookie-gold-dark) !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

body .cky-consent-container .cky-notice-btn-wrapper {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 16px !important;
}

/* wspólne buttony */
body .cky-consent-container .cky-btn,
body .cky-modal .cky-btn {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    font-family: Montserrat, Arial, Helvetica, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease !important;
}

body .cky-consent-container .cky-btn:hover,
body .cky-modal .cky-btn:hover {
    opacity: 1 !important;
    transform: translateY(-1px) !important;
}

/* kolejność i spójność w bannerze */
body .cky-consent-container .cky-btn-accept {
    order: 1 !important;
    color: #fff !important;
    background: var(--bw-cookie-gold) !important;
    border: 1px solid var(--bw-cookie-gold) !important;
    box-shadow: 0 7px 18px rgba(200, 154, 73, 0.20) !important;
}

body .cky-consent-container .cky-btn-accept:hover {
    background: var(--bw-cookie-gold-dark) !important;
    border-color: var(--bw-cookie-gold-dark) !important;
}

body .cky-consent-container .cky-btn-reject {
    order: 2 !important;
    color: var(--bw-cookie-text) !important;
    background: #fff !important;
    border: 1px solid #b8ad9f !important;
    box-shadow: none !important;
}

body .cky-consent-container .cky-btn-reject:hover {
    background: var(--bw-cookie-bg-soft) !important;
    border-color: var(--bw-cookie-text) !important;
}

body .cky-consent-container .cky-btn-customize {
    order: 3 !important;
    min-height: 34px !important;
    padding: 4px 6px !important;
    color: var(--bw-cookie-muted) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
}

body .cky-consent-container .cky-btn-customize:hover {
    color: var(--bw-cookie-text) !important;
    transform: none !important;
}

body .cky-consent-bar .cky-banner-btn-close {
    top: 14px !important;
    right: 14px !important;
    width: 30px !important;
    height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

body .cky-consent-bar .cky-banner-btn-close:hover {
    background: var(--bw-cookie-bg-soft) !important;
}

body .cky-consent-bar .cky-banner-btn-close img,
body .cky-preference-header .cky-btn-close img {
    width: 11px !important;
    height: 11px !important;
    opacity: .72 !important;
}

/* =========================
   OVERLAY + MODAL / DRAWER
   ========================= */
body .cky-overlay {
    background: rgba(20, 17, 14, 0.42) !important;
    opacity: 1 !important;
    backdrop-filter: blur(2px) !important;
    z-index: 99999998 !important;
}

body .cky-modal {
    z-index: 99999999 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: stretch !important;
}

body .cky-modal .cky-preference-center {
    width: min(420px, calc(100vw - 16px)) !important;
    max-width: 420px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin-left: auto !important;
    background: var(--bw-cookie-bg) !important;
    border-left: 1px solid var(--bw-cookie-line) !important;
    border-radius: 0 !important;
    box-shadow: var(--bw-cookie-shadow) !important;
    overflow: hidden !important;
}

body .cky-modal .cky-preference-header {
    padding: 22px 22px 18px !important;
    background: var(--bw-cookie-bg) !important;
    border-bottom: 1px solid var(--bw-cookie-line) !important;
}

body .cky-modal .cky-preference-title {
    color: var(--bw-cookie-text) !important;
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

body .cky-modal .cky-preference-content-wrapper {
    padding: 16px 22px 10px !important;
    color: var(--bw-cookie-muted) !important;
    font-size: 13px !important;
    line-height: 1.58 !important;
}

body .cky-modal .cky-preference-content-wrapper p {
    margin: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

body .cky-modal .cky-accordion-wrapper {
    padding: 0 22px 14px !important;
}

body .cky-modal .cky-accordion {
    margin: 0 0 10px !important;
    border: 1px solid var(--bw-cookie-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
    overflow: hidden !important;
}

body .cky-modal .cky-accordion-header {
    min-height: 56px !important;
    padding: 14px !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

body .cky-modal .cky-accordion-btn {
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    text-align: left !important;
    color: var(--bw-cookie-text) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

body .cky-modal .cky-accordion-header-des,
body .cky-modal .cky-accordion-header-des * {
    color: var(--bw-cookie-muted) !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}

body .cky-modal .cky-always-active {
    color: var(--bw-cookie-gold-dark) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    margin-left: auto !important;
}

body .cky-modal .cky-switch {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

body .cky-modal .cky-switch input[type="checkbox"] {
    width: 42px !important;
    height: 23px !important;
    background: #c9c3bb !important;
    box-shadow: none !important;
}

body .cky-modal .cky-switch input[type="checkbox"]:checked {
    background: var(--bw-cookie-gold) !important;
}

body .cky-modal .cky-switch input[type="checkbox"]::before {
    width: 19px !important;
    height: 19px !important;
}

body .cky-modal .cky-switch input[type="checkbox"]:checked::before {
    transform: translateX(19px) !important;
}

body .cky-modal .cky-footer-wrapper {
    background: var(--bw-cookie-bg) !important;
    border-top: 1px solid var(--bw-cookie-line) !important;
}

body .cky-modal .cky-prefrence-btn-wrapper,
body .cky-modal .cky-preference-btn-wrapper {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 16px 22px !important;
}

/* spójny układ przycisków w panelu ustawień */
body .cky-modal .cky-btn-preferences,
body .cky-modal [data-cky-tag="detail-save-button"] {
    order: 1 !important;
    color: #fff !important;
    background: var(--bw-cookie-gold) !important;
    border: 1px solid var(--bw-cookie-gold) !important;
    box-shadow: 0 7px 18px rgba(200, 154, 73, 0.20) !important;
}

body .cky-modal .cky-btn-accept,
body .cky-modal [data-cky-tag="detail-accept-button"] {
    order: 2 !important;
    color: var(--bw-cookie-text) !important;
    background: #fff !important;
    border: 1px solid #b8ad9f !important;
    box-shadow: none !important;
}

body .cky-modal .cky-btn-reject,
body .cky-modal [data-cky-tag="detail-reject-button"] {
    order: 3 !important;
    color: var(--bw-cookie-muted) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    min-height: 34px !important;
    padding: 4px 6px !important;
}

body .cky-modal .cky-btn-preferences:hover,
body .cky-modal [data-cky-tag="detail-save-button"]:hover {
    background: var(--bw-cookie-gold-dark) !important;
    border-color: var(--bw-cookie-gold-dark) !important;
}

body .cky-modal .cky-btn-accept:hover,
body .cky-modal [data-cky-tag="detail-accept-button"]:hover {
    background: var(--bw-cookie-bg-soft) !important;
    border-color: var(--bw-cookie-text) !important;
}

body .cky-modal .cky-btn-reject:hover,
body .cky-modal [data-cky-tag="detail-reject-button"]:hover {
    color: var(--bw-cookie-text) !important;
    transform: none !important;
}

body .cky-modal [data-cky-tag="detail-powered-by"] {
    padding: 4px 22px 12px !important;
    color: #948a80 !important;
    font-size: 10px !important;
    opacity: .76 !important;
}

/* =========================
   REVISIT BUTTON
   ========================= */
body .cky-btn-revisit-wrapper {
    width: 44px !important;
    height: 44px !important;
    left: 14px !important;
    right: auto !important;
    bottom: 14px !important;
    background: var(--bw-cookie-gold) !important;
    border: 1px solid rgba(255,255,255,.72) !important;
    box-shadow: 0 8px 24px rgba(35, 28, 19, 0.18) !important;
}

body .cky-btn-revisit-wrapper:hover {
    background: var(--bw-cookie-gold-dark) !important;
}

body .cky-btn-revisit-wrapper .cky-btn-revisit img {
    width: 20px !important;
    height: 20px !important;
    filter: brightness(0) invert(1) !important;
}

/* =========================
   ACCESSIBILITY
   ========================= */
body .cky-consent-container .cky-btn:focus-visible,
body .cky-modal .cky-btn:focus-visible,
body .cky-btn-revisit-wrapper .cky-btn-revisit:focus-visible,
body .cky-consent-bar .cky-banner-btn-close:focus-visible,
body .cky-modal .cky-btn-close:focus-visible,
body .cky-modal .cky-switch input[type="checkbox"]:focus-visible,
body .cky-consent-container a:focus-visible {
    outline: 3px solid rgba(200, 154, 73, .46) !important;
    outline-offset: 3px !important;
}

.bellwether-cookie-settings-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 640px) {
    body .cky-consent-container {
        left: 8px !important;
        right: 8px !important;
        width: calc(100vw - 16px) !important;
        bottom: 8px !important;
    }

    body .cky-consent-container .cky-consent-bar {
        padding: 18px 16px 16px !important;
        border-radius: 14px !important;
    }

    body .cky-consent-container .cky-title {
        font-size: 21px !important;
    }

    body .cky-consent-container .cky-notice-des,
    body .cky-consent-container .cky-notice-des p,
    body .cky-consent-container .cky-notice-des * {
        font-size: 12px !important;
        line-height: 1.55 !important;
    }

    body .cky-modal .cky-preference-center {
        width: 100vw !important;
        max-width: 100vw !important;
    }

    body .cky-modal .cky-preference-header {
        padding: 18px 16px 14px !important;
    }

    body .cky-modal .cky-preference-title {
        font-size: 21px !important;
    }

    body .cky-modal .cky-preference-content-wrapper {
        padding: 14px 16px 10px !important;
        font-size: 12px !important;
    }

    body .cky-modal .cky-accordion-wrapper {
        padding: 0 16px 12px !important;
    }

    body .cky-modal .cky-prefrence-btn-wrapper,
    body .cky-modal .cky-preference-btn-wrapper {
        padding: 14px 16px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .cky-consent-container .cky-btn,
    body .cky-modal .cky-btn {
        transition: none !important;
    }
}
