/* =============================================
 * EDP Cookie Consent – Popup Styles (DSGVO)
 * =============================================
 * DSGVO-konform: Gleichwertige Buttons,
 * keine Dark Patterns.
 * Angepasst an Rossoll-Feuerung CI:
 *   Primary Red: #E82D2F
 *   Gold: #F5BC44
 *   Dark Stone: #1c1917
 *   Light BG: #fafaf9
 * ============================================= */

/* Overlay / Backdrop */
.cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cc-overlay.cc-visible {
    background: rgba(28, 25, 23, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cc-overlay.cc-hiding {
    background: rgba(0, 0, 0, 0);
}

/* Popup Card */
.cc-banner {
    position: relative;
    background: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 1rem;
    box-shadow: 0 25px 60px rgba(28, 25, 23, 0.15), 0 0 0 1px rgba(28, 25, 23, 0.04) inset;
    max-width: 480px;
    width: 100%;
    transform: translateY(30px) scale(0.96);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    overflow: visible;
}

/* Cookie Badge – overlapping top center */
.cc-cookie-badge {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow:
        0 0 16px rgba(28, 25, 23, 0.08),
        0 0 32px rgba(28, 25, 23, 0.04),
        0 4px 12px rgba(28, 25, 23, 0.12);
    border: 1px solid #e7e5e4;
    z-index: 1;
}

/* Header row: Initial badge + title */
.cc-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

/* Company Initial Badge – inline, top-left */
.cc-badge-initial {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--cc-accent, #E82D2F);
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.cc-visible .cc-banner {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.cc-hiding .cc-banner {
    transform: translateY(20px) scale(0.97);
    opacity: 0;
}

/* Content */
.cc-content {
    padding: 2.25rem 1.75rem 1.75rem;
}

/* Header */
.cc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1c1917;
    margin: 0;
    letter-spacing: -0.02em;
}

.cc-desc {
    font-size: 0.8125rem;
    color: #78716c;
    line-height: 1.7;
    margin: 1.75rem 0 2.5rem;
}

.cc-link {
    color: #E82D2F;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.cc-link:hover {
    color: #c41e20;
}

/* ==========================================
 * BUTTONS – DSGVO-konform: GLEICHWERTIG
 * Akzeptieren und Ablehnen haben identische
 * Groesse, Gewicht und Sichtbarkeit.
 * ========================================== */
.cc-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

/* Primary row: Accept + Reject side by side, EQUAL */
.cc-actions-primary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.cc-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    font-family: inherit;
    text-align: center;
    white-space: nowrap;
}

/* Alle akzeptieren – Brand Color */
.cc-btn-accept {
    background: #E82D2F;
    color: #fff;
    border-color: #E82D2F;
}

.cc-btn-accept:hover {
    background: #c41e20;
    border-color: #c41e20;
}

/* Ablehnen – identisch, Brand Color (DSGVO gleichwertig) */
.cc-btn-reject {
    background: #E82D2F;
    color: #fff;
    border-color: #E82D2F;
}

.cc-btn-reject:hover {
    background: #c41e20;
    border-color: #c41e20;
}

/* Auswahl speichern */
.cc-btn-save {
    background: #E82D2F;
    color: #fff;
    border-color: #E82D2F;
}

.cc-btn-save:hover {
    background: #c41e20;
    border-color: #c41e20;
}

/* Einstellungen – Secondary action */
.cc-btn-settings {
    background: transparent;
    color: #78716c;
    border-color: #d6d3d1;
    font-size: 0.75rem;
}

.cc-btn-settings:hover {
    background: #f5f5f4;
    color: #44403c;
}

/* Category Details Panel */
.cc-details {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e7e5e4;
}

.cc-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cc-category {
    display: block;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e7e5e4;
    background: #fafaf9;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.cc-category:hover {
    border-color: #d6d3d1;
    background: #f5f5f4;
}

.cc-category[data-locked="true"] {
    cursor: default;
    opacity: 0.6;
}

.cc-category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cc-category-header input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #E82D2F;
    cursor: pointer;
    flex-shrink: 0;
}

.cc-category-header input[type="checkbox"]:disabled {
    cursor: default;
}

.cc-checkmark {
    display: none;
}

.cc-category-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #292524;
}

.cc-badge {
    font-size: 0.625rem;
    color: #78716c;
    background: #f5f5f4;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    margin-left: auto;
    white-space: nowrap;
}

.cc-category-desc {
    font-size: 0.6875rem;
    color: #a8a29e;
    line-height: 1.5;
    margin: 0.375rem 0 0 1.5rem;
}

/* Footer Links */
.cc-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e7e5e4;
}

.cc-footer-link {
    font-size: 0.6875rem;
    color: #a8a29e;
    text-decoration: none;
    transition: color 0.2s;
}

.cc-footer-link:hover {
    color: #E82D2F;
}

.cc-footer-sep {
    font-size: 0.625rem;
    color: #d6d3d1;
}

/* ==========================================
 * PLACEHOLDERS – For consent-gated iframes
 * ========================================== */
.cc-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 0.75rem;
    min-height: 200px;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cc-placeholder-inner {
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 320px;
}

.cc-placeholder-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

.cc-placeholder-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #292524;
    margin: 0 0 0.5rem 0;
}

.cc-placeholder-text {
    font-size: 0.75rem;
    color: #78716c;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.cc-placeholder-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #E82D2F;
    background: #E82D2F;
    color: #fff;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}

.cc-placeholder-btn:hover {
    background: #c41e20;
    border-color: #c41e20;
}

.cc-placeholder-hint {
    font-size: 0.625rem;
    color: #a8a29e;
    margin: 0.75rem 0 0 0;
}

.cc-placeholder-link {
    color: #E82D2F;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cc-placeholder-link:hover {
    color: #c41e20;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .cc-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .cc-banner {
        border-radius: 1rem 1rem 0 0;
        max-width: 100%;
    }

    .cc-visible .cc-banner {
        transform: translateY(0);
    }
}
