/* ==========================================================================
   B2B Kit Cookie Notice — All styles
   Self-contained; remove src/Modules/Privacy/ to delete entirely.
   Theme color controlled by --b2bk-cky-primary (injected via wp_head).
   ========================================================================== */

/* ---- Overlay ---- */
.b2bk-cky-overlay {
    background: rgba(0,0,0,.4);
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 99999999;
}
.b2bk-cky-hide { display: none !important; }

/* ---- Revisit icon ---- */
.b2bk-cky-btn-revisit-wrapper {
    display: flex; align-items: center; justify-content: center;
    background: var(--b2bk-cky-primary, #1863dc); width: 45px; height: 45px;
    border-radius: 50%; position: fixed; z-index: 999999; cursor: pointer;
}
.b2bk-cky-revisit-bottom-left  { bottom: 15px; left: 15px; }
.b2bk-cky-revisit-bottom-right { bottom: 15px; right: 15px; }
.b2bk-cky-btn-revisit-wrapper .b2bk-cky-btn-revisit {
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer; margin: 0; padding: 0;
}
.b2bk-cky-btn-revisit-wrapper .b2bk-cky-btn-revisit img {
    max-width: fit-content; margin: 0; height: 30px; width: 30px;
}
.b2bk-cky-revisit-hide { display: none; }

/* ---- Consent container ---- */
.b2bk-cky-consent-container {
    position: fixed; width: 100%; box-sizing: border-box; z-index: 9999999;
}
.b2bk-cky-consent-container .b2bk-cky-consent-bar {
    background: #fff; border: 1px solid; padding: 16.5px 24px;
    box-shadow: 0 -1px 10px 0 rgba(172,171,171,.3);
    border-color: #f4f4f4;
}
.b2bk-cky-banner-bottom { bottom: 0; left: 0; }
.b2bk-cky-banner-top    { top: 0; left: 0; }

/* ---- Notice ---- */
.b2bk-cky-notice .b2bk-cky-title {
    color: #212121; font-weight: 700; font-size: 18px; line-height: 24px;
    margin: 0 0 12px 0;
}
.b2bk-cky-notice-group {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 14px; line-height: 24px; font-weight: 400;
}
.b2bk-cky-notice-des { color: #212121; font-size: 14px; line-height: 24px; font-weight: 400; }
.b2bk-cky-notice-des p { color: inherit; margin-top: 0; }
.b2bk-cky-notice-des p:last-child { margin-bottom: 0; }

/* ---- Buttons ---- */
.b2bk-cky-notice-btn-wrapper {
    display: flex; justify-content: center; align-items: center; margin-left: 15px;
}
.b2bk-cky-notice-btn-wrapper .b2bk-cky-btn {
    text-shadow: none; box-shadow: none;
}
.b2bk-cky-btn {
    font-size: 14px; font-family: inherit; line-height: 24px; padding: 8px 27px;
    font-weight: 500; margin: 0 8px 0 0; border-radius: 2px; white-space: nowrap;
    cursor: pointer; text-align: center; text-transform: none; min-height: 0;
}
.b2bk-cky-btn:hover { opacity: .8; }
.b2bk-cky-btn-customize {
    color: var(--b2bk-cky-primary, #1863dc); background: transparent;
    border: 2px solid var(--b2bk-cky-primary, #1863dc);
}
.b2bk-cky-btn-reject {
    color: var(--b2bk-cky-primary, #1863dc); background: transparent;
    border: 2px solid var(--b2bk-cky-primary, #1863dc);
}
.b2bk-cky-btn-accept {
    background: var(--b2bk-cky-primary, #1863dc);
    color: var(--b2bk-cky-primary-text, #fff);
    border: 2px solid var(--b2bk-cky-primary, #1863dc);
}
.b2bk-cky-btn:last-child { margin-right: 0; }

/* ---- Close button on banner ---- */
.b2bk-cky-consent-bar .b2bk-cky-banner-btn-close {
    position: absolute; right: 9px; top: 5px; background: none; border: none;
    cursor: pointer; padding: 0; margin: 0; min-height: 0; line-height: 0;
    height: 24px; width: 24px; text-shadow: none; box-shadow: none;
}
.b2bk-cky-consent-bar .b2bk-cky-banner-btn-close img {
    height: 9px; width: 9px; margin: 0;
}

/* ---- Modal ---- */
.b2bk-cky-modal {
    box-shadow: 0 32px 68px rgba(0,0,0,.3); margin: 0 auto; position: fixed;
    max-width: 100%; background: #fff; top: 50%; box-sizing: border-box;
    border-radius: 6px; z-index: 999999999; color: #212121;
    transform: translate(-50%, 100%); visibility: hidden; transition: all 0s ease;
}
.b2bk-cky-modal.b2bk-cky-modal-open {
    display: flex; visibility: visible; transform: translate(-50%, -50%);
    top: 50%; left: 50%; transition: all 1s ease;
}
.b2bk-cky-preference-center {
    max-height: 79vh; overflow: hidden; width: 845px; overflow: hidden;
    flex: 1 1 0; display: flex; flex-direction: column; border-radius: 6px;
}

/* ---- Preference header ---- */
.b2bk-cky-preference-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 24px; border-bottom: 1px solid; border-color: #f4f4f4;
}
.b2bk-cky-preference-header .b2bk-cky-preference-title {
    font-size: 18px; font-weight: 700; line-height: 24px;
}
.b2bk-cky-preference-header .b2bk-cky-btn-close {
    margin: 0; cursor: pointer; vertical-align: middle; padding: 0;
    background: none; border: none; width: 24px; height: 24px;
    min-height: 0; line-height: 0; text-shadow: none; box-shadow: none;
}
.b2bk-cky-preference-header .b2bk-cky-btn-close img {
    margin: 0; height: 10px; width: 10px;
}

/* ---- Preference body ---- */
.b2bk-cky-preference-body-wrapper {
    padding: 0 24px; flex: 1; overflow: auto; box-sizing: border-box;
}
.b2bk-cky-preference-content-wrapper {
    font-size: 14px; line-height: 24px; font-weight: 400; padding: 12px 0;
    border-bottom: 1px solid; border-color: #f4f4f4;
}
.b2bk-cky-preference-content-wrapper p { color: inherit; margin-top: 0; }
.b2bk-cky-preference-content-wrapper p:last-child { margin-bottom: 0; }

/* ---- Accordion ---- */
.b2bk-cky-accordion-wrapper { margin-bottom: 10px; }
.b2bk-cky-accordion { border-bottom: 1px solid; border-color: #f4f4f4; }
.b2bk-cky-accordion:last-child { border-bottom: none; }
.b2bk-cky-accordion .b2bk-cky-accordion-item {
    display: flex; margin-top: 10px;
}
.b2bk-cky-accordion .b2bk-cky-accordion-body { display: none; }
.b2bk-cky-accordion.b2bk-cky-accordion-active .b2bk-cky-accordion-body {
    display: block; padding: 0 22px; margin-bottom: 16px;
}
.b2bk-cky-accordion-header-wrapper { cursor: pointer; width: 100%; }
.b2bk-cky-accordion-item .b2bk-cky-accordion-header {
    display: flex; justify-content: space-between; align-items: center;
}
.b2bk-cky-accordion-header .b2bk-cky-accordion-btn {
    font-size: 16px; font-family: inherit; color: #212121; line-height: 24px;
    background: none; border: none; font-weight: 700; padding: 0; margin: 0;
    cursor: pointer; text-transform: none; min-height: 0; text-shadow: none; box-shadow: none;
}
.b2bk-cky-accordion-header .b2bk-cky-always-active {
    color: #008000; font-weight: 600; line-height: 24px; font-size: 14px;
}
.b2bk-cky-accordion-header-des {
    font-size: 14px; line-height: 24px; margin: 10px 0 16px 0; color: #212121;
}

/* ---- Toggle switch ---- */
.b2bk-cky-switch { display: flex; }
.b2bk-cky-switch input[type="checkbox"] {
    position: relative; width: 44px; height: 24px; margin: 0; background: #d0d5d2;
    -webkit-appearance: none; border-radius: 50px; cursor: pointer; outline: 0; border: none; top: 0;
}
.b2bk-cky-switch input[type="checkbox"]:checked {
    background: var(--b2bk-cky-primary, #1863dc);
}
.b2bk-cky-switch input[type="checkbox"]:before {
    position: absolute; content: ""; height: 20px; width: 20px; left: 2px; bottom: 2px;
    border-radius: 50%; background-color: #fff; transition: .4s; margin: 0;
}
.b2bk-cky-switch input[type="checkbox"]:after { display: none; }
.b2bk-cky-switch input[type="checkbox"]:checked:before {
    transform: translateX(20px);
}

/* ---- Audit table ---- */
.b2bk-cky-audit-table {
    background: #f4f4f4; border-radius: 6px;
}
.b2bk-cky-audit-table .b2bk-cky-empty-cookies-text {
    color: inherit; font-size: 12px; line-height: 24px; margin: 0; padding: 10px;
}

/* ---- Footer ---- */
.b2bk-cky-footer-wrapper { position: relative; }
.b2bk-cky-footer-shadow {
    display: block; width: 100%; height: 40px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 100%);
    position: absolute; bottom: calc(100% - 1px);
}
.b2bk-cky-prefrence-btn-wrapper {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    padding: 22px 24px; border-top: 1px solid; border-color: #f4f4f4;
}
.b2bk-cky-prefrence-btn-wrapper .b2bk-cky-btn {
    flex: auto; max-width: 100%; text-shadow: none; box-shadow: none;
}
.b2bk-cky-btn-preferences {
    color: var(--b2bk-cky-primary, #1863dc); background: transparent;
    border: 2px solid var(--b2bk-cky-primary, #1863dc);
}

/* ---- Accessibility ---- */
.b2bk-cky-notice-des a.cky-policy,
.b2bk-cky-notice-des button.cky-policy {
    font-size: 14px; color: var(--b2bk-cky-primary, #1863dc);
    white-space: nowrap; cursor: pointer; background: transparent;
    border: 1px solid; text-decoration: underline;
}
.b2bk-cky-btn:focus-visible,
.b2bk-cky-accordion-header .b2bk-cky-accordion-btn:focus-visible,
.b2bk-cky-preference-header .b2bk-cky-btn-close:focus-visible,
.b2bk-cky-consent-bar .b2bk-cky-banner-btn-close:focus-visible {
    outline: 2px solid var(--b2bk-cky-primary, #1863dc); outline-offset: 2px;
}

/* ---- RTL ---- */
.b2bk-cky-rtl { direction: rtl; text-align: right; }
.b2bk-cky-rtl .b2bk-cky-notice-btn-wrapper { margin-left: 0; margin-right: 15px; }

/* ---- Responsive ---- */
@media (max-width: 845px) {
    .b2bk-cky-modal { max-width: calc(100% - 16px); }
}
@media (max-width: 768px) {
    .b2bk-cky-notice-group { display: block; }
    .b2bk-cky-notice-btn-wrapper { margin-left: 0; }
    .b2bk-cky-notice-btn-wrapper .b2bk-cky-btn {
        flex: auto; max-width: 100%; margin-top: 10px; white-space: unset;
    }
}
@media (max-width: 576px) {
    .b2bk-cky-notice-btn-wrapper { flex-direction: column; }
    .b2bk-cky-consent-container .b2bk-cky-consent-bar { padding: 16.5px 0; }
    .b2bk-cky-notice .b2bk-cky-title,
    .b2bk-cky-notice-des,
    .b2bk-cky-notice-btn-wrapper { padding: 0 28px; }
    .b2bk-cky-notice-des { max-height: 40vh; overflow-y: scroll; }
    .b2bk-cky-notice-btn-wrapper .b2bk-cky-btn {
        width: 100%; padding: 8px; margin-right: 0;
    }
    .b2bk-cky-notice-btn-wrapper .b2bk-cky-btn-accept   { order: 1; }
    .b2bk-cky-notice-btn-wrapper .b2bk-cky-btn-reject   { order: 3; }
    .b2bk-cky-notice-btn-wrapper .b2bk-cky-btn-customize { order: 2; }
    .b2bk-cky-modal { max-width: 100%; }
    .b2bk-cky-preference-center { max-height: 100vh; }
    .b2bk-cky-prefrence-btn-wrapper { flex-direction: column; }
    .b2bk-cky-accordion.b2bk-cky-accordion-active .b2bk-cky-accordion-body { padding-right: 0; }
    .b2bk-cky-prefrence-btn-wrapper .b2bk-cky-btn { width: 100%; margin: 10px 0 0 0; }
    .b2bk-cky-prefrence-btn-wrapper .b2bk-cky-btn-reject      { order: 3; }
    .b2bk-cky-prefrence-btn-wrapper .b2bk-cky-btn-accept      { order: 1; margin-top: 0; }
    .b2bk-cky-prefrence-btn-wrapper .b2bk-cky-btn-preferences { order: 2; }
}
@media (max-width: 425px) {
    .b2bk-cky-notice .b2bk-cky-title,
    .b2bk-cky-notice-des,
    .b2bk-cky-notice-btn-wrapper { padding: 0 24px; }
    .b2bk-cky-switch input[type="checkbox"] { width: 38px; height: 21px; }
    .b2bk-cky-switch input[type="checkbox"]:before { height: 17px; width: 17px; }
    .b2bk-cky-switch input[type="checkbox"]:checked:before { transform: translateX(17px); }
    .b2bk-cky-btn { width: 100%; margin: 10px 0 0 0; }
    .b2bk-cky-notice-btn-wrapper .b2bk-cky-btn-customize { order: 2; }
    .b2bk-cky-notice-btn-wrapper .b2bk-cky-btn-reject    { order: 3; }
    .b2bk-cky-notice-btn-wrapper .b2bk-cky-btn-accept    { order: 1; margin-top: 16px; }
}
@media (max-width: 352px) {
    .b2bk-cky-notice .b2bk-cky-title     { font-size: 16px; }
    .b2bk-cky-notice-des                 { font-size: 12px; }
    .b2bk-cky-btn                        { font-size: 12px; }
    .b2bk-cky-preference-header .b2bk-cky-preference-title { font-size: 16px; }
    .b2bk-cky-accordion-header .b2bk-cky-accordion-btn     { font-size: 14px; }
}
