/* ── Cookie-Consent-Banner ─────────────────────────────────────────────── */
/* DSGVO-konformer Cookie-Banner — Eigenentwicklung für findedeinhandwerker.de */
/* 3 Kategorien: Notwendig (immer), Statistik (Opt-in), Marketing (Opt-in) */

/* ── Overlay ──────────────────────────────────────────────────────────── */
.fdh-cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fdh-cc-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── Banner (Bottom-Sheet) ────────────────────────────────────────────── */
.fdh-cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    border-top: 3px solid #50C9CE;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-height: 90vh;
    overflow-y: auto;
}

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

/* ── Inner Container ──────────────────────────────────────────────────── */
.fdh-cc-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px 32px 24px;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.fdh-cc-title {
    font-family: 'Kurdis', 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2E382E;
    margin: 0 0 8px;
}

.fdh-cc-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #555;
    margin: 0 0 20px;
}

.fdh-cc-text a {
    color: #50C9CE;
    text-decoration: underline;
}

/* ── Kategorie-Toggle ─────────────────────────────────────────────────── */
.fdh-cc-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.fdh-cc-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f7f8fa;
    border-radius: 8px;
    padding: 12px 16px;
}

.fdh-cc-cat-info {
    flex: 1;
}

.fdh-cc-cat-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: #2E382E;
}

.fdh-cc-cat-desc {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

/* ── Toggle Switch ────────────────────────────────────────────────────── */
.fdh-cc-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 16px;
}

.fdh-cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.fdh-cc-toggle-track {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.fdh-cc-toggle-track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.fdh-cc-toggle input:checked + .fdh-cc-toggle-track {
    background: #50C9CE;
}

.fdh-cc-toggle input:checked + .fdh-cc-toggle-track::after {
    transform: translateX(20px);
}

.fdh-cc-toggle input:disabled + .fdh-cc-toggle-track {
    background: #50C9CE;
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.fdh-cc-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fdh-cc-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Kurdis', 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: center;
}

.fdh-cc-btn-accept {
    background: #2E382E;
    color: #fff;
}

.fdh-cc-btn-accept:hover {
    background: #1d281d;
}

.fdh-cc-btn-save {
    background: #50C9CE;
    color: #fff;
}

.fdh-cc-btn-save:hover {
    background: #3ab5ba;
}

.fdh-cc-btn-reject {
    background: #f0f0f0;
    color: #555;
}

.fdh-cc-btn-reject:hover {
    background: #e0e0e0;
    color: #333;
}

/* ── Details-Toggle (Erweitert) ───────────────────────────────────────── */
.fdh-cc-details-toggle {
    background: none;
    border: none;
    color: #50C9CE;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
    text-decoration: underline;
    font-family: inherit;
}

.fdh-cc-details-toggle:hover {
    color: #2E382E;
}

/* ── Compact View (Initial) ───────────────────────────────────────────── */
.fdh-cc-categories {
    display: none;
}

.fdh-cc-banner.is-expanded .fdh-cc-categories {
    display: flex;
}

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .fdh-cc-inner {
        padding: 20px 16px 18px;
    }

    .fdh-cc-buttons {
        flex-direction: column;
    }

    .fdh-cc-btn {
        min-width: unset;
    }

    .fdh-cc-cat {
        padding: 10px 12px;
    }
}
