/**
 * WhatsApp-Datenschutz-Gate Styling
 * Wird als Vollbild-Overlay angezeigt — z-index sehr hoch, damit es
 * auch über Page-Builder-Layouts (Elementor, Divi) korrekt erscheint.
 */

.swf-wa-consent-wrapper {
    position: fixed;
    inset: 0;
    z-index: 2147483600; /* sehr hoch, knapp unter Chat-Widget */
    display: flex;
    align-items: center;
    justify-content: center;
}

.swf-wa-consent-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: swf-wa-fade-in 0.2s ease-out;
}

.swf-wa-consent-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 20px;
    background: #fff;
    border-radius: 16px;
    padding: 24px 24px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.12);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    animation: swf-wa-slide-up 0.25s ease-out;
}

.swf-wa-consent-wrapper.is-leaving .swf-wa-consent-backdrop {
    animation: swf-wa-fade-out 0.2s ease-in forwards;
}
.swf-wa-consent-wrapper.is-leaving .swf-wa-consent-card {
    animation: swf-wa-slide-down 0.2s ease-in forwards;
}

@keyframes swf-wa-fade-in    { from { opacity: 0; } to { opacity: 1; } }
@keyframes swf-wa-fade-out   { from { opacity: 1; } to { opacity: 0; } }
@keyframes swf-wa-slide-up   { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes swf-wa-slide-down { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(10px) scale(0.96); } }

/* Icon-Container */
.swf-wa-consent-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #25D366; /* WhatsApp-Grün */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.swf-wa-consent-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.8);
}
.swf-wa-consent-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.swf-wa-consent-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}

.swf-wa-consent-intro {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.55;
    color: #000;
    text-align: center;
    padding: 0 4px;
}

/* Checkbox-Block */
.swf-wa-consent-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    padding: 12px;
    background: #f8f9fc;
    border-radius: 10px;
    border: 1px solid #e8eaf2;
    margin-bottom: 16px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.swf-wa-consent-check-label:hover {
    border-color: #25D366;
    background: #f4fcf6;
}
.swf-wa-consent-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #25D366;
}
.swf-wa-consent-text {
    flex: 1;
    font-size: 12.5px;
    line-height: 1.55;
    color: #1a1a2e;
}
.swf-wa-consent-text a,
.swf-wa-consent-intro a {
    color: #1e6fd8 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}
.swf-wa-consent-text a:hover,
.swf-wa-consent-intro a:hover {
    color: #0d4ea3 !important;
}
.swf-wa-consent-req {
    color: #e74c3c;
    margin-left: 2px;
}

/* Buttons */
.swf-wa-consent-accept {
    width: 100%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    border: none;
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    margin-bottom: 8px;
    font-family: inherit;
}
.swf-wa-consent-accept:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}
.swf-wa-consent-accept:disabled {
    background: #cbd0db;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.swf-wa-consent-cancel {
    width: 100%;
    background: transparent;
    color: #5a5d6e;
    border: 1px solid #d1d5db;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.swf-wa-consent-cancel:hover {
    background: #f3f4f6;
    color: #1a1a2e;
}

.swf-wa-consent-note {
    margin: 12px 0 0;
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

/* Mobile-Tweaks */
@media (max-width: 480px) {
    .swf-wa-consent-card {
        max-width: calc(100vw - 32px);
        padding: 20px 18px 16px;
    }
    .swf-wa-consent-card h3 { font-size: 16px; }
    .swf-wa-consent-intro { font-size: 12.5px; }
}
