/* Cookie consent banner – markup in inc/cookie-consent.php */

/* Hide CookieYes while this banner is active, so two banners never show. */
.almog-cc-active .cky-consent-container,
.almog-cc-active .cky-modal,
.almog-cc-active .cky-overlay,
.almog-cc-active .cky-btn-revisit-wrapper {
    display: none !important;
}

#almog-cc {
    --acc-green: #0f4c3a;
    --acc-green-dark: #0a3729;
    --acc-text: #141414;
    --acc-muted: #555555;
    --acc-border: #dcdcdc;
    --acc-off: #3a3a3a;
    --acc-focus: #1a73e8;
    font-family: 'Heebo', Arial, sans-serif;
    color: var(--acc-text);
    direction: rtl;
    text-align: right;
}
#almog-cc[hidden],
#almog-cc [hidden] { display: none !important; }
#almog-cc *,
#almog-cc *::before,
#almog-cc *::after { box-sizing: border-box; }

#almog-cc button {
    font-family: inherit;
    margin: 0;
    cursor: pointer;
}
#almog-cc button:focus-visible,
#almog-cc a:focus-visible {
    outline: 2px solid var(--acc-focus);
    outline-offset: 2px;
}
#almog-cc a { color: var(--acc-green); text-decoration: underline; font-weight: 700; }

#almog-cc .acc-title {
    margin: 0 0 6px;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--acc-text);
    letter-spacing: 0;
    text-transform: none;
}
#almog-cc .acc-text {
    margin: 0 0 14px;
    padding: 0;
    font-size: 13px;
    line-height: 1.75;
    color: var(--acc-text);
}

#almog-cc .acc-logo img {
    display: block;
    max-width: 110px;
    max-height: 48px;
    width: auto;
    height: auto;
}

#almog-cc .acc-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--acc-text);
}
#almog-cc .acc-close:hover { background: #f0f0f0; }

/* ── Buttons ── */
#almog-cc .acc-btn {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 8px 20px;
    border: 2px solid var(--acc-green);
    border-radius: 4px;
    background: #fff;
    color: var(--acc-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color .15s, color .15s;
}
#almog-cc .acc-btn:hover { background: #f1f6f4; }
#almog-cc .acc-btn-accept { background: var(--acc-green); color: #fff; }
#almog-cc .acc-btn-accept:hover { background: var(--acc-green-dark); border-color: var(--acc-green-dark); }

/* ── Toggle switch ── */
#almog-cc .acc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--acc-text);
    cursor: pointer;
    user-select: none;
}
#almog-cc .acc-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
#almog-cc .acc-track {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    border-radius: 13px;
    background: var(--acc-off);
    transition: background-color .2s;
}
#almog-cc .acc-track::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: right .2s;
}
#almog-cc .acc-switch input:checked + .acc-track { background: var(--acc-green); }
#almog-cc .acc-switch input:checked + .acc-track::after { right: 23px; }
#almog-cc .acc-switch input:disabled + .acc-track { opacity: .7; }
#almog-cc .acc-switch:has(input:disabled) { cursor: not-allowed; }
#almog-cc .acc-switch input:focus-visible + .acc-track {
    outline: 2px solid var(--acc-focus);
    outline-offset: 2px;
}

/* ── Bottom bar ── */
#almog-cc .acc-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2147483000;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 40px 24px;
    background: #fff;
    box-shadow: 0 -4px 28px rgba(0, 0, 0, .18);
}
#almog-cc .acc-bar > .acc-close {
    position: absolute;
    top: 12px;
    left: 16px;
}
#almog-cc .acc-bar-inner {
    display: flex;
    align-items: center;
    gap: 36px;
    max-width: 1240px;
    margin: 0 auto;
}
#almog-cc .acc-bar-body { flex: 1 1 auto; min-width: 0; }
#almog-cc .acc-bar-toggles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 30px;
}
#almog-cc .acc-details-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--acc-green);
    font-size: 13px;
    font-weight: 700;
}
#almog-cc .acc-details-link svg { transform: scaleX(-1); }
#almog-cc .acc-bar-actions {
    display: flex;
    flex: 0 0 200px;
    flex-direction: column;
    gap: 12px;
    margin-left: 24px;
}

/* ── Dialog ── */
#almog-cc .acc-modal-wrap {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .45);
}
#almog-cc .acc-modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .3);
    outline: none;
}
#almog-cc .acc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-bottom: 1px solid var(--acc-border);
}
#almog-cc .acc-tabs {
    display: flex;
    border-bottom: 1px solid var(--acc-border);
}
#almog-cc .acc-tab {
    flex: 1 1 0;
    padding: 16px 8px 13px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--acc-text);
    font-size: 14px;
    font-weight: 700;
}
#almog-cc .acc-tab:hover { color: var(--acc-green); }
#almog-cc .acc-tab[aria-selected="true"] {
    color: var(--acc-green);
    border-bottom-color: var(--acc-green);
}
#almog-cc .acc-panels {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
#almog-cc .acc-panel { padding: 24px 28px; }

#almog-cc .acc-consent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 20px -28px -24px;
    border-top: 1px solid var(--acc-border);
}
#almog-cc .acc-consent-cell {
    display: flex;
    justify-content: center;
    padding: 18px 12px;
    border-left: 1px solid var(--acc-border);
}
#almog-cc .acc-consent-cell:last-child { border-left: 0; }
#almog-cc .acc-consent-cell .acc-switch {
    flex-direction: column;
    gap: 10px;
}

#almog-cc .acc-cat {
    padding: 18px 0;
    border-bottom: 1px solid var(--acc-border);
}
#almog-cc .acc-cat:first-child { padding-top: 0; }
#almog-cc .acc-cat:last-child { border-bottom: 0; }
#almog-cc .acc-cat-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
#almog-cc .acc-cat-head .acc-switch-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
#almog-cc .acc-cat-expand {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--acc-text);
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}
#almog-cc .acc-chev { display: inline-flex; transition: transform .2s; transform: rotate(90deg); }
#almog-cc .acc-cat-expand[aria-expanded="true"] .acc-chev { transform: rotate(-90deg); }
#almog-cc .acc-badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #e6e6e6;
    color: var(--acc-text);
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}
#almog-cc .acc-cat-desc {
    margin: 8px 24px 0 0;
    font-size: 13px;
    line-height: 1.75;
    color: var(--acc-text);
}
#almog-cc .acc-cat-list {
    margin: 14px 24px 0 0;
    overflow-x: auto;
}
#almog-cc .acc-cat-list table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 12.5px;
}
#almog-cc .acc-cat-list th,
#almog-cc .acc-cat-list td {
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #ececec;
    text-align: right;
    vertical-align: top;
    color: var(--acc-text);
}
#almog-cc .acc-cat-list th { background: #f5f5f5; font-weight: 700; }
#almog-cc .acc-cat-list td[dir="ltr"] { direction: ltr; unicode-bidi: isolate; text-align: right; font-family: Consolas, monospace; }

#almog-cc .acc-panel-about .acc-text { font-size: 14px; }
#almog-cc .acc-consent-info {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 4px;
    background: #f3f5f4;
    font-size: 13px;
    line-height: 1.8;
    word-break: break-all;
}

#almog-cc .acc-modal-foot {
    display: flex;
    gap: 16px;
    padding: 18px 28px;
    border-top: 1px solid var(--acc-border);
}

/* ── Re-open button ── */
#almog-cc .acc-revisit {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 2147482999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--acc-green);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
#almog-cc .acc-revisit:hover { background: var(--acc-green-dark); }

/* ── Tablet / mobile ── */
@media (max-width: 900px) {
    #almog-cc .acc-bar { padding: 22px 16px 16px; }
    #almog-cc .acc-bar-inner { flex-direction: column; align-items: stretch; gap: 16px; }
    #almog-cc .acc-bar .acc-logo { display: none; }
    #almog-cc .acc-bar-body { padding-left: 32px; }
    #almog-cc .acc-bar-actions { flex: 0 0 auto; flex-direction: row; margin: 0; }
}

@media (max-width: 600px) {
    #almog-cc .acc-text { font-size: 12.5px; line-height: 1.65; }
    #almog-cc .acc-bar-toggles {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    #almog-cc .acc-details-link { grid-column: 1 / -1; }
    #almog-cc .acc-bar-actions { flex-direction: column; gap: 10px; }

    #almog-cc .acc-modal-wrap { padding: 0; }
    #almog-cc .acc-modal { height: 100%; max-height: none; border-radius: 0; }
    #almog-cc .acc-modal-head { padding: 12px 16px; }
    #almog-cc .acc-tab { font-size: 13px; padding: 14px 4px 11px; }
    #almog-cc .acc-panel { padding: 20px 16px; }
    #almog-cc .acc-consent-grid { grid-template-columns: 1fr 1fr; margin: 16px -16px -20px; }
    #almog-cc .acc-consent-cell { border-bottom: 1px solid var(--acc-border); }
    #almog-cc .acc-consent-cell:nth-child(2n) { border-left: 0; }
    #almog-cc .acc-cat-desc,
    #almog-cc .acc-cat-list { margin-right: 0; }
    #almog-cc .acc-modal-foot { flex-direction: column-reverse; gap: 10px; padding: 14px 16px; }
}
