/* DF Cookie Consent - Banner & Modal Styles
   Driven by CSS variables defined inline by the plugin.
   Selectors are intentionally specific (and use a few !important resets)
   so that aggressive theme/Elementor styles cannot leak into the banner. */

.dfcc-no-scroll { overflow: hidden; }

/* ============ Scope reset ============ */
/* Force a clean baseline inside the banner & modal so themes can't paint
   buttons / headings / links with their own typography. */
.dfcc-banner,
.dfcc-banner *,
.dfcc-modal,
.dfcc-modal *,
.dfcc-floating,
.dfcc-floating * {
    box-sizing: border-box;
}

.dfcc-banner button,
.dfcc-modal button,
.dfcc-floating {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
    background-color: transparent;
    border: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-family: inherit;
    font-style: normal;
    margin: 0;
    min-height: 0;
    min-width: 0;
    cursor: pointer;
}

.dfcc-banner a,
.dfcc-modal a {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0;
    margin: 0;
}

.dfcc-banner h2,
.dfcc-banner h3,
.dfcc-modal h2,
.dfcc-modal h3,
.dfcc-banner p,
.dfcc-modal p {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-style: normal;
    letter-spacing: normal;
    text-transform: none;
    text-shadow: none;
    color: inherit;
}

/* ============ Shared button ============ */
.dfcc-banner .dfcc-btn,
.dfcc-modal .dfcc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-weight: 500;
    line-height: 1.2;
    padding: 11px 18px;
    border-radius: var(--dfcc-btn-radius, 8px);
    transition: transform .15s ease, opacity .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
    text-decoration: none !important;
    white-space: nowrap;
    height: auto;
}
.dfcc-banner .dfcc-btn:focus,
.dfcc-modal .dfcc-btn:focus {
    outline: 0;
}
.dfcc-banner .dfcc-btn:focus-visible,
.dfcc-modal .dfcc-btn:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--dfcc-accent, #111) 35%, transparent);
}
.dfcc-banner .dfcc-btn:active,
.dfcc-modal .dfcc-btn:active {
    transform: translateY(0);
    opacity: .92;
}

/* Variants */
.dfcc-banner .dfcc-btn--primary,
.dfcc-modal .dfcc-btn--primary {
    background-color: var(--dfcc-btn-bg, #111);
    color: var(--dfcc-btn-text, #fff);
}
.dfcc-banner .dfcc-btn--primary:hover,
.dfcc-modal .dfcc-btn--primary:hover {
    background-color: var(--dfcc-btn-hover-bg, var(--dfcc-btn-bg, #111));
    color: var(--dfcc-btn-hover-text, var(--dfcc-btn-text, #fff));
}

.dfcc-banner .dfcc-btn--alt,
.dfcc-modal .dfcc-btn--alt {
    background-color: var(--dfcc-btn-alt-bg, #f3f4f6);
    color: var(--dfcc-btn-alt-text, #111);
}
.dfcc-banner .dfcc-btn--alt:hover,
.dfcc-modal .dfcc-btn--alt:hover {
    background-color: var(--dfcc-btn-alt-hover-bg, var(--dfcc-btn-alt-bg, #f3f4f6));
    color: var(--dfcc-btn-alt-hover-text, var(--dfcc-btn-alt-text, #111));
}

.dfcc-banner .dfcc-btn--ghost,
.dfcc-modal .dfcc-btn--ghost {
    background-color: transparent;
    color: var(--dfcc-text, #111);
    text-decoration: underline !important;
    text-underline-offset: 3px;
    padding: 11px 6px;
}
.dfcc-banner .dfcc-btn--ghost:hover,
.dfcc-modal .dfcc-btn--ghost:hover {
    color: var(--dfcc-accent, #111);
}

/* ============ Banner ============ */
.dfcc-banner {
    position: fixed;
    z-index: 999990;
    color: var(--dfcc-text, #111);
    background: var(--dfcc-bg, #fff);
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    border-radius: var(--dfcc-radius, 12px);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .25s ease, transform .25s ease;
    font-family: inherit;
    font-size: var(--dfcc-text-size, 14px);
    line-height: 1.55;
}
.dfcc-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Bottom-bar variant */
.dfcc-banner--bottom_bar {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Modal variant (banner appears centered) */
.dfcc-banner--modal {
    left: 50%;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -45%);
    max-width: 520px;
    width: calc(100% - 32px);
}
.dfcc-banner--modal.is-visible {
    transform: translate(-50%, -50%);
}
.dfcc-banner--modal::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 25, .45);
    z-index: -1;
}

.dfcc-banner__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    align-items: center;
    padding: 20px 24px;
}
.dfcc-banner--modal .dfcc-banner__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 26px;
}

.dfcc-banner__copy {
    flex: 1 1 320px;
    min-width: 0;
    max-width: 640px;
}

.dfcc-banner .dfcc-banner__title {
    margin: 0 0 6px !important;
    padding: 0 !important;
    font-size: var(--dfcc-title-size, 16px) !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em !important;
    color: var(--dfcc-text, #111) !important;
}

.dfcc-banner .dfcc-banner__text {
    margin: 0 !important;
    font-size: var(--dfcc-text-size, 14px) !important;
    line-height: 1.55 !important;
    color: var(--dfcc-text, #111) !important;
    font-weight: 400 !important;
}

.dfcc-banner__links {
    margin: 8px 0 0 !important;
    font-size: 12px !important;
    color: var(--dfcc-muted, #6b7280) !important;
}
.dfcc-banner__links a {
    color: inherit !important;
    text-decoration: underline !important;
}
.dfcc-banner__links a:hover {
    color: var(--dfcc-accent, #111) !important;
}

.dfcc-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}
.dfcc-banner--modal .dfcc-banner__actions { justify-content: stretch; }
.dfcc-banner--modal .dfcc-banner__actions .dfcc-btn { flex: 1 1 auto; }

/* ============ Modal ============ */
.dfcc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .2s ease;
    font-family: inherit;
    font-size: var(--dfcc-text-size, 14px);
}
.dfcc-modal.is-visible { opacity: 1; }
.dfcc-modal[hidden] { display: none; }

.dfcc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,15,25,.5);
    cursor: pointer;
}

.dfcc-modal__panel {
    position: relative;
    background: var(--dfcc-bg, #fff);
    color: var(--dfcc-text, #111);
    border-radius: var(--dfcc-radius, 12px);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 28px 28px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    transform: translateY(8px);
    transition: transform .2s ease;
}
.dfcc-modal.is-visible .dfcc-modal__panel { transform: translateY(0); }

.dfcc-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent !important;
    font-size: 22px !important;
    line-height: 1 !important;
    color: var(--dfcc-muted, #6b7280) !important;
    padding: 6px 10px !important;
    border-radius: 6px;
    transition: color .15s ease, background-color .15s ease;
}
.dfcc-modal__close:hover {
    color: var(--dfcc-text, #111) !important;
    background-color: rgba(0,0,0,.04) !important;
}

.dfcc-modal .dfcc-modal__title {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: calc(var(--dfcc-title-size, 16px) + 4px) !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    color: var(--dfcc-text, #111) !important;
}
.dfcc-modal .dfcc-modal__intro {
    margin: 0 0 18px !important;
    font-size: var(--dfcc-text-size, 14px) !important;
    color: var(--dfcc-muted, #6b7280) !important;
    line-height: 1.55 !important;
}

/* Categories */
.dfcc-cats { display: flex; flex-direction: column; gap: 0; }
.dfcc-cat {
    padding: 14px 0;
    border-top: 1px solid rgba(0,0,0,.08);
}
.dfcc-cat:first-child { border-top: 0; padding-top: 4px; }

.dfcc-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.dfcc-modal .dfcc-cat__label {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: var(--dfcc-text, #111) !important;
}
.dfcc-cat__desc {
    margin: 6px 0 0 !important;
    font-size: 13px !important;
    color: var(--dfcc-muted, #6b7280) !important;
    line-height: 1.55 !important;
}

/* Toggle */
.dfcc-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
}
.dfcc-toggle input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
    margin: 0;
}
.dfcc-toggle__track {
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    transition: background-color .15s ease;
    display: inline-block;
}
.dfcc-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.dfcc-toggle input:checked + .dfcc-toggle__track {
    background: var(--dfcc-accent, #111);
}
.dfcc-toggle input:checked + .dfcc-toggle__track .dfcc-toggle__thumb {
    transform: translateX(16px);
}
.dfcc-toggle.is-locked { opacity: .55; cursor: not-allowed; }
.dfcc-toggle.is-locked input { cursor: not-allowed; }
.dfcc-toggle .screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px; height: 1px;
    overflow: hidden;
}

.dfcc-modal__links {
    margin: 18px 0 0 !important;
    font-size: 12px !important;
    color: var(--dfcc-muted, #6b7280) !important;
}
.dfcc-modal__links a {
    color: inherit !important;
    text-decoration: underline !important;
}
.dfcc-modal__links a:hover {
    color: var(--dfcc-accent, #111) !important;
}

.dfcc-modal__actions {
    display: flex;
    gap: 8px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.dfcc-modal__actions .dfcc-btn { flex: 1 1 auto; }

/* ============ Floating tag ============ */
/* Desktop: pill with icon + text. Mobile: round icon-only. */
.dfcc-floating {
    position: fixed !important;
    z-index: 999980;
    bottom: 16px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    padding: 9px 14px 9px 12px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    line-height: 1.2 !important;
    border-radius: 999px !important;
    background-color: var(--dfcc-floating-bg, var(--dfcc-btn-bg, #111)) !important;
    color: var(--dfcc-floating-text, var(--dfcc-btn-text, #fff)) !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.16) !important;
    transition: transform .18s ease, background-color .15s ease, color .15s ease, box-shadow .18s ease;
}
.dfcc-floating:hover {
    transform: translateY(-2px);
    background-color: var(--dfcc-floating-hover-bg, var(--dfcc-btn-hover-bg, var(--dfcc-btn-bg, #111))) !important;
    color: var(--dfcc-floating-hover-text, var(--dfcc-btn-hover-text, var(--dfcc-btn-text, #fff))) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.22) !important;
}
.dfcc-floating:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--dfcc-accent, #111) 35%, transparent), 0 6px 20px rgba(0,0,0,.16) !important;
}
.dfcc-floating__icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    line-height: 0 !important;
}
.dfcc-floating__icon svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}
.dfcc-floating__label {
    white-space: nowrap;
    line-height: 1 !important;
}

.dfcc-floating--bottom_left { left: 16px; }
.dfcc-floating--bottom_right { right: 16px; }

/* Mobile: collapse to icon-only round button so it doesn't crowd content. */
@media (max-width: 640px) {
    .dfcc-floating {
        padding: 0 !important;
        width: 44px !important;
        height: 44px !important;
        flex: 0 0 44px !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 50% !important;
        bottom: 14px;
    }
    .dfcc-floating--bottom_left  { left: 14px; }
    .dfcc-floating--bottom_right { right: 14px; }
    .dfcc-floating__icon {
        width: 20px !important;
        height: 20px !important;
        flex: 0 0 20px !important;
    }
    .dfcc-floating__label {
        position: absolute !important;
        clip: rect(1px, 1px, 1px, 1px);
        width: 1px !important;
        height: 1px !important;
        overflow: hidden;
        white-space: nowrap;
    }
}

/* Footer link */
.dfcc-footer-link,
.dfcc-settings-link {
    display: inline-block;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* ============ Mobile ============ */
@media (max-width: 640px) {
    .dfcc-banner__inner { padding: 16px; }
    .dfcc-banner__actions { width: 100%; }
    .dfcc-banner__actions .dfcc-btn { flex: 1 1 calc(50% - 8px); }
    .dfcc-banner__actions .dfcc-btn--ghost { flex: 1 1 100%; order: -1; }
    .dfcc-modal__panel { padding: 22px 18px 18px; }
    .dfcc-banner .dfcc-banner__title { font-size: calc(var(--dfcc-title-size, 16px) - 1px) !important; }
}
