/**
 * WhatsApp & Kontakt Float-Button Styles — webpowers UG
 */

.wp-wa {
    position: fixed;
    bottom: 20px;
    /* z-index 1040 entspricht dem Bootstrap-Bereich für fixierte Elemente und
       bleibt damit bewusst UNTER typischen Consent-/Cookie-Bannern, die meist
       z-index >= 2000 nutzen. So wird die Einwilligung nie überdeckt. */
    z-index: 1040;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.wp-wa--bottom-right {
    right: 20px;
    align-items: flex-end;
}

.wp-wa--bottom-left {
    left: 20px;
    align-items: flex-start;
}

/* Launcher-Button */
.wp-wa__launcher {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wp-wa__launcher:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.wp-wa__launcher:active {
    transform: scale(0.97);
}

.wp-wa__launcher:focus-visible {
    outline: 3px solid #1a73e8;
    outline-offset: 2px;
}

.wp-wa__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Popover-Panel */
.wp-wa__panel {
    width: 280px;
    max-width: calc(100vw - 40px);
    margin-bottom: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transform-origin: bottom right;
    animation: wp-wa-in 0.18s ease;
}

.wp-wa--bottom-left .wp-wa__panel {
    transform-origin: bottom left;
}

@keyframes wp-wa-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wp-wa__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.wp-wa__title {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
}

.wp-wa__close {
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: inline-flex;
}

.wp-wa__close:hover {
    background: #e9ecef;
    color: #212529;
}

.wp-wa__close:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 1px;
}

.wp-wa__channels {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
}

.wp-wa__channel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #212529;
    transition: background 0.12s ease;
}

.wp-wa__channel:hover {
    background: #f1f3f5;
}

.wp-wa__channel:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 1px;
}

.wp-wa__channel .wp-wa__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
}

.wp-wa__channel--whatsapp .wp-wa__icon { background: #25D366; }
.wp-wa__channel--phone .wp-wa__icon    { background: #0d6efd; }
.wp-wa__channel--email .wp-wa__icon    { background: #6c757d; }

.wp-wa__channel-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wp-wa__channel-label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.wp-wa__channel-note {
    font-size: 11px;
    color: #6c757d;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Responsive */
@media (max-width: 480px) {
    .wp-wa { bottom: 14px; }
    .wp-wa--bottom-right { right: 14px; }
    .wp-wa--bottom-left { left: 14px; }
}

/* Bewegungsreduzierung respektieren */
@media (prefers-reduced-motion: reduce) {
    .wp-wa__launcher,
    .wp-wa__channel,
    .wp-wa__close {
        transition: none;
    }
    .wp-wa__launcher:hover {
        transform: none;
    }
    .wp-wa__panel {
        animation: none;
    }
}
