/* Techzu Engine — Cookie Consent (PDPA) */
.tz-cc {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

.tz-cc [hidden] {
    display: none !important;
}

/* ---------- Banner ---------- */
.tz-cc__banner {
    position: fixed;
    z-index: 999990;
    background: var(--tz-cc-bg, #1f2937);
    color: var(--tz-cc-text, #f9fafb);
    border: var(--tz-cc-border-w, 0) solid var(--tz-cc-border, transparent);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
}

.tz-cc__banner--bar-bottom {
    left: 0;
    right: 0;
    bottom: 0;
}

.tz-cc__banner--bar-top {
    left: 0;
    right: 0;
    top: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.tz-cc__banner--box-bottom-right,
.tz-cc__banner--box-bottom-left {
    bottom: 20px;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.tz-cc__banner--box-bottom-right {
    right: 20px;
}

.tz-cc__banner--box-bottom-left {
    left: 20px;
}

.tz-cc__banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
}

.tz-cc__banner--box-bottom-right .tz-cc__banner-inner,
.tz-cc__banner--box-bottom-left .tz-cc__banner-inner {
    flex-direction: column;
    align-items: stretch;
}

.tz-cc__content {
    flex: 1 1 320px;
    min-width: 0;
}

.tz-cc__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--tz-cc-text, #f9fafb);
}

.tz-cc__message {
    margin: 0;
    color: var(--tz-cc-text, #f9fafb);
    opacity: 0.92;
}

.tz-cc__policy-link,
.tz-cc__policy-link:hover,
.tz-cc__policy-link:focus {
    color: var(--tz-cc-link, #93c5fd);
    text-decoration: underline;
}

.tz-cc__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ---------- Buttons ----------
   Hardened with !important so theme button styles (borders, transparent
   backgrounds, uppercase, etc.) cannot bleed into the consent UI. */
.tz-cc .tz-cc__btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    width: auto !important;
    min-height: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
    white-space: nowrap !important;
}

.tz-cc .tz-cc__btn--primary {
    background: var(--tz-cc-btn-bg, #2563eb) !important;
    color: var(--tz-cc-btn-text, #ffffff) !important;
    border-color: var(--tz-cc-btn-border, var(--tz-cc-btn-bg, #2563eb)) !important;
}

.tz-cc .tz-cc__btn--primary:hover,
.tz-cc .tz-cc__btn--primary:focus {
    background: var(--tz-cc-btn-hover, #1d4ed8) !important;
    color: var(--tz-cc-btn-text, #ffffff) !important;
    border-color: var(--tz-cc-btn-border, var(--tz-cc-btn-hover, #1d4ed8)) !important;
}

.tz-cc .tz-cc__btn--ghost {
    background: transparent !important;
    color: var(--tz-cc-text, #f9fafb) !important;
    border-color: var(--tz-cc-btn-border, currentColor) !important;
    opacity: 0.85;
}

.tz-cc .tz-cc__btn--ghost:hover,
.tz-cc .tz-cc__btn--ghost:focus {
    opacity: 1;
}

.tz-cc .tz-cc__btn:focus-visible {
    outline: 2px solid var(--tz-cc-link, #93c5fd) !important;
    outline-offset: 2px;
}

/* ---------- Preferences modal ---------- */
.tz-cc__modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999995;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tz-cc__modal {
    background: var(--tz-cc-bg, #1f2937);
    color: var(--tz-cc-text, #f9fafb);
    border: var(--tz-cc-border-w, 0) solid var(--tz-cc-border, transparent);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tz-cc__modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 12px;
}

.tz-cc__modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--tz-cc-text, #f9fafb);
}

.tz-cc__close {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--tz-cc-text, #f9fafb);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    opacity: 0.8;
}

.tz-cc__close:hover {
    opacity: 1;
}

.tz-cc__modal-body {
    padding: 4px 22px 12px;
    overflow-y: auto;
}

.tz-cc__category {
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tz-cc__category:first-child {
    border-top: 0;
}

.tz-cc__category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tz-cc__category-name {
    font-weight: 700;
}

.tz-cc__always-on {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
}

.tz-cc__category-desc {
    margin: 6px 0 0;
    opacity: 0.85;
    font-size: 13px;
}

/* Toggle switch */
.tz-cc__switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
}

.tz-cc__switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.tz-cc__slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    transition: background-color 0.18s ease;
}

.tz-cc__slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.18s ease;
}

.tz-cc__switch input:checked + .tz-cc__slider {
    background: var(--tz-cc-btn-bg, #2563eb);
}

.tz-cc__switch input:checked + .tz-cc__slider::before {
    transform: translateX(20px);
}

.tz-cc__switch input:focus-visible + .tz-cc__slider {
    outline: 2px solid var(--tz-cc-link, #93c5fd);
    outline-offset: 2px;
}

.tz-cc__modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 22px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- Re-open button ---------- */
.tz-cc__reopen {
    position: fixed;
    bottom: 18px;
    z-index: 999985;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    background: var(--tz-cc-bg, #1f2937);
    color: var(--tz-cc-text, #f9fafb);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    opacity: 0.9;
    transition: opacity 0.18s ease;
}

.tz-cc__reopen:hover,
.tz-cc__reopen:focus {
    opacity: 1;
}

.tz-cc__reopen--bottom-left {
    left: 18px;
}

.tz-cc__reopen--bottom-right {
    right: 18px;
}

.tz-cc__reopen-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.tz-cc__reopen-icon svg {
    width: 100%;
    height: 100%;
}

/* Screen-reader helper (WordPress core class may not exist on front end) */
.tz-cc .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 600px) {
    .tz-cc__banner-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .tz-cc__actions {
        justify-content: stretch;
    }

    .tz-cc__actions .tz-cc__btn {
        flex: 1 1 auto;
        text-align: center;
    }
}
