/**
 * plg_system_cookieconsent styles.
 * Plain CSS, no dependencies. Prefix: cc-
 */

.cc-banner,
.cc-backdrop,
.cc-settings-tab {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
}

/* ------------------------------------------------------------------ */
/* Banner                                                              */
/* ------------------------------------------------------------------ */

.cc-banner {
    position: fixed;
    z-index: 2147483000;
    background: #ffffff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.14);
    border-top: 1px solid #e5e7eb;
}

.cc-banner[hidden] {
    display: none;
}

.cc-pos-bottom {
    left: 0;
    right: 0;
    bottom: 0;
}

.cc-pos-top {
    left: 0;
    right: 0;
    top: 0;
    border-top: 0;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.14);
}

.cc-pos-bottom-left {
    left: 16px;
    bottom: 16px;
    right: auto;
    max-width: 420px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
}

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

.cc-pos-bottom-left .cc-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.cc-banner-text {
    flex: 1 1 auto;
    min-width: 0;
}

.cc-banner-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
}

.cc-banner-desc {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
}

.cc-policy-link {
    color: #1d4ed8;
    text-decoration: underline;
}

.cc-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cc-pos-bottom-left .cc-banner-actions {
    justify-content: stretch;
}

.cc-pos-bottom-left .cc-banner-actions .cc-btn {
    flex: 1 1 auto;
}

/* ------------------------------------------------------------------ */
/* Buttons (reject is as prominent as accept: no dark patterns)        */
/* ------------------------------------------------------------------ */

.cc-btn {
    appearance: none;
    border: 1px solid #1f2937;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    color: #1f2937;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cc-btn:hover {
    background: #f3f4f6;
}

.cc-btn:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.cc-btn-accept {
    background: #1f2937;
    color: #ffffff;
}

.cc-btn-accept:hover {
    background: #111827;
}

.cc-btn-small {
    padding: 8px 14px;
    font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* Preferences modal                                                   */
/* ------------------------------------------------------------------ */

.cc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    background: rgba(17, 24, 39, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cc-backdrop[hidden] {
    display: none;
}

body.cc-modal-open {
    overflow: hidden;
}

.cc-modal {
    background: #ffffff;
    border-radius: 14px;
    max-width: 620px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 26px 28px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.cc-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.cc-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.cc-modal-close {
    appearance: none;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0 4px;
}

.cc-modal-close:hover {
    color: #111827;
}

.cc-modal-intro {
    margin: 0 0 18px;
    font-size: 14px;
    color: #4b5563;
}

.cc-cat {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.cc-cat-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cc-cat-title {
    font-weight: 700;
    font-size: 15px;
    flex: 1 1 auto;
}

.cc-cat-badge {
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
    background: #d1fae5;
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}

.cc-cat-desc {
    margin: 10px 0 6px;
    font-size: 14px;
    color: #4b5563;
}

.cc-cat-examples {
    margin: 0;
    font-size: 12.5px;
    color: #6b7280;
    word-break: break-word;
}

.cc-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* Toggle switch */
.cc-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.cc-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cc-switch input:checked + .cc-slider {
    background: #1f2937;
}

.cc-switch input:checked + .cc-slider::before {
    transform: translateX(20px);
}

.cc-switch input:disabled + .cc-slider {
    background: #6b7280;
    cursor: not-allowed;
}

.cc-switch input:focus-visible + .cc-slider {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Blocked embeds                                                      */
/* ------------------------------------------------------------------ */

.cc-embed-wrap {
    position: relative;
}

.cc-embed-placeholder {
    border: 1px dashed #9ca3af;
    border-radius: 10px;
    background: #f9fafb;
    padding: 28px 20px;
    text-align: center;
    color: #4b5563;
    font-size: 14px;
}

.cc-embed-placeholder p {
    margin: 0 0 12px;
}

/* ------------------------------------------------------------------ */
/* Floating settings tab                                               */
/* ------------------------------------------------------------------ */

.cc-settings-tab {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 2147482999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cc-settings-tab:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cc-settings-tab:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

/* Avoid covering the tab when the bottom-left banner card is visible. */
.cc-pos-bottom-left ~ .cc-settings-tab {
    bottom: auto;
    top: 16px;
    left: auto;
    right: 16px;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 720px) {
    .cc-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }

    .cc-banner-actions {
        justify-content: stretch;
    }

    .cc-banner-actions .cc-btn {
        flex: 1 1 auto;
    }

    .cc-pos-bottom-left {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }

    .cc-modal {
        padding: 20px;
    }

    .cc-modal-actions {
        justify-content: stretch;
    }

    .cc-modal-actions .cc-btn {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-btn,
    .cc-slider,
    .cc-slider::before,
    .cc-settings-tab {
        transition: none;
    }
}
