/* ==========================================================================
   Cookie Consent by You — Stylesheet
   Accent Color: #A05C55 (Compact banner, generous button padding)
   ========================================================================== */

:root {
    --ccby-font: 'AlbertSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --ccby-accent: #A05C55;
    --ccby-accent-hover: #8B4D47;
    --ccby-accent-active: #783E38;
    --ccby-accent-subtle: rgba(160, 92, 85, 0.08);
    --ccby-accent-soft: rgba(160, 92, 85, 0.15);
    --ccby-accent-border: rgba(160, 92, 85, 0.28);
    --ccby-accent-glow: rgba(160, 92, 85, 0.35);

    --ccby-bg-banner: #FFFFFF;
    --ccby-bg-card: #FAF6F5;
    --ccby-bg-card-hover: #F5EFEB;
    --ccby-border-card: #EFE4E1;
    --ccby-border-light: #EAEAEF;

    --ccby-text-primary: #1C1E24;
    --ccby-text-secondary: #4E5260;
    --ccby-text-muted: #7A7E8D;
    --ccby-danger: #C0392B;

    --ccby-radius-sm: 8px;
    --ccby-radius-md: 10px;
    --ccby-radius-lg: 14px;
    --ccby-radius-full: 9999px;

    --ccby-shadow-banner: 0 16px 40px -6px rgba(32, 24, 24, 0.16), 0 6px 16px -4px rgba(32, 24, 24, 0.08);
    --ccby-shadow-float: 0 10px 24px -2px rgba(160, 92, 85, 0.45), 0 3px 8px rgba(0, 0, 0, 0.08);
    --ccby-shadow-card: 0 16px 36px -6px rgba(28, 25, 23, 0.15), 0 5px 12px -2px rgba(28, 25, 23, 0.07);
    --ccby-shadow-toggle: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ---------- Banner Wrapper & Container ---------- */
#ccby-wrapper {
    position: relative;
    z-index: 99999;
}

.cmplz-cookiebanner {
    background: var(--ccby-bg-banner);
    color: var(--ccby-text-primary);
    box-shadow: var(--ccby-shadow-banner);
    border: 1px solid var(--ccby-accent-border);
    width: 500px;
    max-width: calc(100vw - 28px);
    font-family: 'AlbertSans', var(--ccby-font) !important;
    padding: 18px 20px;
    position: fixed;
    z-index: 99999;
    left: 20px;
    bottom: 20px;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: var(--ccby-radius-lg);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.cmplz-cookiebanner *,
.cmplz-cookiebanner *::before,
.cmplz-cookiebanner *::after,
#ccby-post-consent-wrapper *,
#ccby-post-consent-wrapper *::before,
#ccby-post-consent-wrapper *::after {
    box-sizing: border-box;
    font-family: 'AlbertSans', var(--ccby-font) !important;
}

.cmplz-cookiebanner.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ---------- Header & Logo ---------- */
.cmplz-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
    flex-direction: column;
}

.cmplz-logo {
    display: flex;
    align-items: center;
}

.cmplz-logo a {
    display: inline-block;
    line-height: 1.2;
    text-decoration: none;
}

.cmplz-logo img,
.cmplz-logo-img {
    max-height: 30px;
    width: auto;
    max-width: 150px;
    border-radius: var(--ccby-radius-sm);
    object-fit: contain;
    object-position: left center;
    display: block;
}

.cmplz-site-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ccby-accent);
    letter-spacing: -0.01em;
}

.cmplz-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.35;
    color: var(--ccby-text-primary);
    letter-spacing: -0.01em;
}

/* ---------- Divider ---------- */
.cmplz-divider {
    margin: 10px 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, var(--ccby-accent-border) 0%, var(--ccby-border-light) 65%, transparent 100%);
}

.cmplz-divider-header {
    margin-bottom: 10px;
}

.cmplz-divider.cmplz-footer {
    margin-top: 12px;
    margin-bottom: 10px;
}

/* ---------- Body & Text Content ---------- */
.cmplz-body {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 0;
    gap: 10px;
    display: flex;
    flex-direction: column;
}

.cmplz-categories-init-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cmplz-message {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ccby-text-secondary);
}

/* ---------- Categories List (Shown instantly when opening Preferences / Tilpasse) ---------- */
.cmplz-categories {
    padding: 2px 0;
    display: none; /* Hidden on initial view; shown instantly when clicking Tilpasse */
    flex-direction: column;
    gap: 8px;
    max-height: 48vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ccby-accent-border) transparent;
}

.cmplz-categories.show-categories {
    display: flex;
}

.cmplz-categories::-webkit-scrollbar {
    width: 5px;
}

.cmplz-categories::-webkit-scrollbar-thumb {
    background-color: var(--ccby-accent-border);
    border-radius: 4px;
}

/* ---------- Category Card ---------- */
.cmplz-category {
    background: var(--ccby-bg-card);
    border: 1px solid var(--ccby-border-card);
    padding: 9px 12px;
    border-radius: var(--ccby-radius-md);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.cmplz-category:hover {
    background: var(--ccby-bg-card-hover);
    border-color: var(--ccby-accent-border);
    box-shadow: 0 2px 6px var(--ccby-accent-subtle);
}

.cmplz-category-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cmplz-category-title {
    color: var(--ccby-text-primary);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    cursor: pointer;
    user-select: none;
}

.cmplz-description {
    padding: 4px 0 1px 0;
    font-size: 12.5px;
    line-height: 1.44;
    color: var(--ccby-text-secondary);
}

.cmplz-always-active {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmplz-always-active-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--ccby-accent);
    background: var(--ccby-accent-subtle);
    padding: 2px 8px;
    border-radius: var(--ccby-radius-full);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* ---------- Reliable Native-Input Toggle Switch ---------- */
.cmplz-banner-checkbox {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.cmplz-banner-checkbox input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
    z-index: 2;
}

.cmplz-banner-checkbox label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #D3D6DC;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    border-radius: 24px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 1;
}

.cmplz-banner-checkbox label::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 50%;
    box-shadow: var(--ccby-shadow-toggle);
}

.cmplz-banner-checkbox input:checked + label {
    background-color: var(--ccby-accent);
}

.cmplz-banner-checkbox input:checked + label::before {
    transform: translateX(20px);
    background-color: #FFFFFF;
}

/* Disabled toggle state (Necessary category) */
.cmplz-banner-checkbox input:disabled {
    cursor: not-allowed;
}

.cmplz-banner-checkbox input:disabled + label {
    background-color: var(--ccby-accent) !important;
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.cmplz-banner-checkbox input:disabled + label::before {
    background-color: #FFFFFF;
}

/* ---------- Prominent Action Buttons (Extra padding & comfortable size) ---------- */
.cmplz-buttons {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cmplz-btn {
    flex: 1;
    min-width: 95px;
    min-height: 42px;
    padding: 11px 18px !important;
    font-family: 'AlbertSans', var(--ccby-font) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.25;
    cursor: pointer;
    border-radius: var(--ccby-radius-sm);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    outline: none;
    user-select: none;
    box-sizing: border-box;
}

.cmplz-btn:focus-visible {
    outline: 2px solid var(--ccby-accent);
    outline-offset: 2px;
}

/* Primary Accept Button */
.cmplz-btn.cmplz-accept {
    background: var(--ccby-accent);
    color: #FFFFFF;
    border: 1px solid var(--ccby-accent);
    box-shadow: 0 2px 8px var(--ccby-accent-border);
}

.cmplz-btn.cmplz-accept:hover {
    background: var(--ccby-accent-hover);
    border-color: var(--ccby-accent-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--ccby-accent-glow);
}

.cmplz-btn.cmplz-accept:active {
    background: var(--ccby-accent-active);
    transform: translateY(0);
    box-shadow: 0 1px 4px var(--ccby-accent-subtle);
}

/* Deny Button */
.cmplz-btn.cmplz-deny {
    background: #FFFFFF;
    color: var(--ccby-text-secondary);
    border: 1px solid #D0D3DC;
}

.cmplz-btn.cmplz-deny:hover {
    background: #F8F9FA;
    color: var(--ccby-text-primary);
    border-color: #B4B7C2;
    transform: translateY(-1px);
}

.cmplz-btn.cmplz-deny:active {
    background: #EEEEF2;
    transform: translateY(0);
}

/* View Preferences / Customize Button (shown initially) */
.cmplz-btn.cmplz-view-preferences {
    background: #FFFFFF;
    color: var(--ccby-accent);
    border: 1px solid var(--ccby-accent-border);
    display: inline-flex;
}

.cmplz-btn.cmplz-view-preferences:hover {
    background: var(--ccby-accent-subtle);
    border-color: var(--ccby-accent);
    color: var(--ccby-accent-hover);
    transform: translateY(-1px);
}

.cmplz-btn.cmplz-view-preferences:active {
    transform: translateY(0);
}

/* Save Preferences Button (hidden initially; shown when categories are opened) */
.cmplz-btn.cmplz-save-preferences {
    background: var(--ccby-accent-subtle);
    color: var(--ccby-accent);
    border: 1px solid var(--ccby-accent-border);
    display: none;
}

.cmplz-btn.cmplz-save-preferences:hover {
    background: var(--ccby-accent-soft);
    border-color: var(--ccby-accent);
    color: var(--ccby-accent-hover);
    transform: translateY(-1px);
}

.cmplz-btn.cmplz-save-preferences:active {
    transform: translateY(0);
}

/* ---------- Links & Documentation ---------- */
.cmplz-links {
    margin-top: 8px;
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cmplz-link {
    color: var(--ccby-accent);
    font-size: 12px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--ccby-accent-glow);
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.cmplz-link:hover {
    color: var(--ccby-accent-hover);
    text-decoration-color: var(--ccby-accent-hover);
}

/* ==========================================================================
   Post-Consent Floating Cookie Bot & Small Summary Dialog
   ========================================================================== */

#ccby-post-consent-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
    font-family: 'AlbertSans', var(--ccby-font) !important;
}

/* Floating Trigger Icon ("Cookie Bot") */
#ccby-post-consent {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    cursor: pointer;
}

#ccby-post-consent.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

#ccby-post-consent-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ccby-accent) 0%, var(--ccby-accent-hover) 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--ccby-shadow-float);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, filter 0.25s ease;
    outline: none;
}

#ccby-post-consent-icon:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: var(--ccby-shadow-float);
    filter: brightness(1.08);
}

#ccby-post-consent-icon:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 4px 12px var(--ccby-accent-glow);
}

#ccby-post-consent-icon:focus-visible {
    outline: 2px solid var(--ccby-accent);
    outline-offset: 3px;
}

.ccby-bot-icon {
    stroke: #FFFFFF;
    transition: transform 0.2s ease;
}

#ccby-post-consent-icon:hover .ccby-bot-icon {
    transform: rotate(-10deg) scale(1.06);
}

/* Floating Post-Consent Summary Dialog */
#ccby-post-consent-small {
    width: 330px;
    max-width: calc(100vw - 32px);
    position: absolute;
    bottom: 6px;
    left: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--ccby-bg-banner);
    padding: 16px 18px;
    border-radius: var(--ccby-radius-lg);
    box-shadow: var(--ccby-shadow-card);
    border: 1px solid var(--ccby-accent-border);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    transform: translateY(10px) scale(0.97);
    font-family: 'AlbertSans', var(--ccby-font) !important;
}

#ccby-post-consent-small.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Post-Consent List */
.list-consents {
    margin: 0 0 8px 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 600;
}

.list-consents li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    background: var(--ccby-bg-card);
    border: 1px solid var(--ccby-border-card);
    border-radius: var(--ccby-radius-sm);
    color: var(--ccby-text-primary);
    transition: background 0.15s ease, border-color 0.15s ease;
	
	span {
		 font-size: 13.5px !important;
	}
}

.list-consents li:hover {
    background: var(--ccby-bg-card-hover);
    border-color: var(--ccby-accent-border);
}

.list-consents .icon-lock {
    stroke: var(--ccby-accent);
    flex-shrink: 0;
}

.list-consents .tick {
    fill: var(--ccby-accent) !important;
    flex-shrink: 0;
    display: inline-block;
}

.list-consents .cross {
    fill: var(--ccby-danger) !important;
    flex-shrink: 0;
    display: none;
}

/* Small Dialog Buttons (Only Cancel and Reset) */
.ccby-small-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 4px;
}

#ccby-close-small,
#ccby-reset-consent {
    padding: 10px 16px !important;
    min-height: 40px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    font-family: 'AlbertSans', var(--ccby-font) !important;
}

#ccby-close-small {
    flex: 1;
    background: #FFFFFF;
    color: var(--ccby-text-secondary);
    border: 1px solid #D2D5DF;
    border-radius: var(--ccby-radius-sm);
}

#ccby-close-small:hover {
    background: #F8F9FA;
    color: var(--ccby-text-primary);
    border-color: #B4B7C2;
    transform: translateY(-1px);
}

#ccby-reset-consent {
    flex: 1.3;
    background: var(--ccby-accent);
    color: #FFFFFF;
    border: 1px solid var(--ccby-accent);
    border-radius: var(--ccby-radius-sm);
    box-shadow: 0 2px 6px var(--ccby-accent-border);
}

#ccby-reset-consent:hover {
    background: var(--ccby-accent-hover);
    border-color: var(--ccby-accent-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--ccby-accent-glow);
}

#ccby-reset-consent:active {
    background: var(--ccby-accent-active);
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media screen and (max-width: 767px) {
    .cmplz-cookiebanner {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        padding: 16px 16px !important;
        border-radius: 12px !important;
        max-height: 88vh !important;
    }

    .cmplz-logo img,
    .cmplz-logo-img {
        max-height: 28px !important;
        max-width: 130px !important;
    }

    .cmplz-title {
        font-size: 15px !important;
    }

    .cmplz-buttons {
        flex-direction: column !important;
        gap: 7px !important;
    }

    .cmplz-btn {
        width: 100% !important;
        padding: 11px 16px !important;
        font-size: 13.5px !important;
    }

    .cmplz-categories {
        max-height: 45vh !important;
        overflow-y: auto !important;
    }

    #ccby-post-consent-wrapper {
        bottom: 14px;
        left: 14px;
    }

    #ccby-post-consent-small {
        width: calc(100vw - 28px) !important;
        max-width: 330px !important;
        padding: 14px 16px !important;
    }
}