/**
 * DLR Cookie Consent – Styles
 * Subtiler Glass-Look, DM Sans + Inter
 * Fonts werden lokal geladen via DLR Local Fonts Plugin.
 */

/* ═══ Reset ═══ */
.dlr-cc-overlay *, .dlr-cc-overlay *::before, .dlr-cc-overlay *::after,
.dlr-cc-revoke *, .dlr-cc-revoke *::before, .dlr-cc-revoke *::after {
    box-sizing: border-box; margin: 0; padding: 0;
}
body.dlr-cc-noscroll { overflow: hidden; }

/* ═══ Overlay ═══ */
.dlr-cc-overlay {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: flex-end; justify-content: center;
    padding: 16px;
    background: rgba(8, 16, 38, 0.18);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: dlrFadeIn 0.3s ease-out;
}
@keyframes dlrFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dlrSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══ Glass Surface (subtil) ═══ */
.dlr-cc-glass {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
            0 4px 24px rgba(13, 27, 53, 0.07),
            0 1px 4px rgba(13, 27, 53, 0.03);
    position: relative;
    overflow: hidden;
}
/* Sehr dezenter Lichtschein oben */
.dlr-cc-glass::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    border-radius: 22px 22px 0 0;
    pointer-events: none; z-index: 1;
}
.dlr-cc-glass-content { position: relative; z-index: 2; }

/* ═══ Layer 1: Banner ═══ */
.dlr-cc-banner { width: 100%; max-width: 680px; animation: dlrSlideUp 0.4s cubic-bezier(0.16,1,0.3,1); }
.dlr-cc-banner .dlr-cc-glass-content { padding: 28px 28px 24px; }

.dlr-cc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dlr-cc-icon {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
    background: rgba(91, 141, 238, 0.08);
    border: 1px solid rgba(91, 141, 238, 0.1);
    display: flex; align-items: center; justify-content: center;
}
.dlr-cc-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px; font-weight: 700; color: #0d1b35;
    line-height: 1.3; letter-spacing: -0.02em;
}
.dlr-cc-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px; line-height: 1.65; color: #4b5563; margin-bottom: 10px;
}
.dlr-cc-links {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px; color: #9ca3af; margin-bottom: 20px;
}
.dlr-cc-links a { color: #5b8dee; text-decoration: none; font-weight: 600; transition: color 0.15s; }
.dlr-cc-links a:hover { color: #0d1b35; text-decoration: underline; }

/* ═══ Buttons ═══ */
.dlr-cc-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.dlr-cc-btn {
    flex: 1 1 0; min-width: 140px; padding: 13px 20px;
    border-radius: 14px; font-family: 'Inter', sans-serif;
    font-size: 13.5px; font-weight: 600; cursor: pointer; border: none;
    transition: all 0.2s cubic-bezier(0.16,1,0.3,1);
    text-align: center; line-height: 1.2;
}
.dlr-cc-btn-primary {
    background: #0d1b35; color: #fff;
    box-shadow: 0 2px 8px rgba(13,27,53,0.15);
}
.dlr-cc-btn-primary:hover { background: #152444; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(13,27,53,0.22); }
.dlr-cc-btn-primary:active { transform: translateY(0); }

.dlr-cc-btn-secondary {
    background: rgba(255,255,255,0.85); color: #0d1b35;
    border: 1.5px solid rgba(13,27,53,0.12);
}
.dlr-cc-btn-secondary:hover { background: #fff; border-color: rgba(13,27,53,0.2); transform: translateY(-1px); }
.dlr-cc-btn-secondary:active { transform: translateY(0); }

.dlr-cc-btn-tertiary {
    background: rgba(255,255,255,0.6); color: #374151;
    border: 1px solid rgba(13,27,53,0.06);
}
.dlr-cc-btn-tertiary:hover { background: rgba(255,255,255,0.85); color: #0d1b35; }

/* ═══ Layer 2: Details ═══ */
.dlr-cc-details { width: 100%; max-width: 680px; animation: dlrSlideUp 0.35s cubic-bezier(0.16,1,0.3,1); }
.dlr-cc-details .dlr-cc-glass-content { padding: 24px 28px; max-height: 80vh; overflow-y: auto; }
.dlr-cc-details .dlr-cc-glass-content::-webkit-scrollbar { width: 5px; }
.dlr-cc-details .dlr-cc-glass-content::-webkit-scrollbar-track { background: transparent; }
.dlr-cc-details .dlr-cc-glass-content::-webkit-scrollbar-thumb { background: rgba(13,27,53,0.12); border-radius: 10px; }

.dlr-cc-details-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dlr-cc-back-btn {
    width: 36px; height: 36px; border-radius: 12px;
    background: rgba(245,247,250,0.8); border: 1px solid rgba(13,27,53,0.06);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #374151; transition: all 0.15s; flex-shrink: 0;
}
.dlr-cc-back-btn:hover { background: #fff; color: #0d1b35; }
.dlr-cc-details-title {
    font-family: 'Inter', sans-serif;
    font-size: 17px; font-weight: 700; color: #0d1b35; letter-spacing: -0.02em;
}
.dlr-cc-details-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px; line-height: 1.6; color: #6b7280; margin-bottom: 20px;
}

/* ═══ Kategorien ═══ */
.dlr-cc-categories { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.dlr-cc-category {
    background: rgba(245,247,250,0.7); border: 1px solid rgba(13,27,53,0.06);
    border-radius: 16px; overflow: hidden; transition: all 0.2s;
}
.dlr-cc-category:hover { background: rgba(245,247,250,0.9); border-color: rgba(91,141,238,0.15); }

.dlr-cc-category-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; gap: 12px; }
.dlr-cc-category-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dlr-cc-category-label { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; color: #0d1b35; }
.dlr-cc-badge-required {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: #5b8dee; background: rgba(91,141,238,0.08); border: 1px solid rgba(91,141,238,0.12);
    padding: 3px 8px; border-radius: 8px;
}
.dlr-cc-category-body { padding: 0 18px 14px; }
.dlr-cc-category-desc { font-family: 'DM Sans', sans-serif; font-size: 12.5px; line-height: 1.55; color: #6b7280; margin-bottom: 6px; }
.dlr-cc-category-cookies { font-size: 11.5px; color: #9ca3af; line-height: 1.5; }
.dlr-cc-category-cookies strong { color: #6b7280; font-weight: 600; }

/* ═══ Toggle ═══ */
.dlr-cc-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.dlr-cc-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.dlr-cc-toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: rgba(13,27,53,0.1); border: 1px solid rgba(13,27,53,0.06);
    border-radius: 24px; transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
}
.dlr-cc-toggle-slider::before {
    content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 2px;
    background: #fff; border-radius: 50%; transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.dlr-cc-toggle input:checked + .dlr-cc-toggle-slider { background: #003DD1; border-color: rgba(0,61,209,0.25); }
.dlr-cc-toggle input:checked + .dlr-cc-toggle-slider::before { transform: translateX(18px); }
.dlr-cc-toggle input:disabled + .dlr-cc-toggle-slider { background: #003DD1; opacity: 0.65; cursor: not-allowed; }
.dlr-cc-toggle input:disabled + .dlr-cc-toggle-slider::before { transform: translateX(18px); }
.dlr-cc-toggle input:focus-visible + .dlr-cc-toggle-slider { outline: 2px solid #003DD1; outline-offset: 2px; }

/* ═══ Revoke ═══ */
.dlr-cc-revoke {
    position: fixed; bottom: 20px; left: 20px; z-index: 999998;
    width: 44px; height: 44px; border-radius: 14px;
    background: rgba(13,27,53,0.7);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    color: #93b4f5; border: 1px solid rgba(147,180,245,0.15);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(13,27,53,0.2);
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
    animation: dlrFadeIn 0.3s ease-out;
}
.dlr-cc-revoke:hover { background: rgba(13,27,53,0.85); transform: scale(1.06); box-shadow: 0 6px 20px rgba(13,27,53,0.28); }
.dlr-cc-revoke:active { transform: scale(0.96); }

/* ═══ Blocked Iframes ═══ */
iframe.dlr-cc-blocked-iframe { background: #f3f4f6; border: 2px dashed #d1d5db; }

/* ═══ Focus ═══ */
.dlr-cc-btn:focus-visible, .dlr-cc-back-btn:focus-visible, .dlr-cc-revoke:focus-visible {
    outline: 2px solid #5b8dee; outline-offset: 2px;
}

/* ═══ Responsive ═══ */
@media (max-width: 640px) {
    .dlr-cc-overlay { padding: 10px; }
    .dlr-cc-banner .dlr-cc-glass-content, .dlr-cc-details .dlr-cc-glass-content { padding: 22px 20px 20px; }
    .dlr-cc-glass { border-radius: 20px; }
    .dlr-cc-glass::before { border-radius: 20px 20px 0 0; }
    .dlr-cc-title { font-size: 16px; }
    .dlr-cc-text { font-size: 13px; }
    .dlr-cc-buttons { flex-direction: column; gap: 8px; }
    .dlr-cc-btn { min-width: unset; padding: 12px 16px; font-size: 13px; }
    .dlr-cc-details .dlr-cc-glass-content { max-height: 85vh; }
    .dlr-cc-revoke { bottom: 14px; left: 14px; width: 40px; height: 40px; border-radius: 12px; }
}
@media print { .dlr-cc-overlay, .dlr-cc-revoke { display: none !important; } }
