/* ═══════════════════════════════════════════════
   KWRAP — Contact Badge (Modern Floating Widget)
   ═══════════════════════════════════════════════ */

.contact-badge {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

/* ────────── Trigger Button ────────── */
.cb-trigger {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--dark);
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        0 4px 20px rgba(255, 215, 0, 0.25),
        0 8px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: visible;
}
.cb-trigger:hover {
    transform: scale(1.06);
    box-shadow:
        0 6px 28px rgba(255, 215, 0, 0.35),
        0 12px 48px rgba(0, 0, 0, 0.35);
}

/* Icon switch */
.cb-trigger .cb-icon-chat,
.cb-trigger .cb-icon-x {
    position: absolute;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cb-trigger .cb-icon-x {
    opacity: 0;
    transform: rotate(-90deg) scale(0.4);
}
.contact-badge.active .cb-trigger .cb-icon-chat {
    opacity: 0;
    transform: rotate(90deg) scale(0.4);
}
.contact-badge.active .cb-trigger .cb-icon-x {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Pulse ring */
.cb-trigger-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    opacity: 0;
    pointer-events: none;
    animation: cbPulse 3s ease-out infinite;
}
.contact-badge.active .cb-trigger-pulse {
    animation: none;
    opacity: 0;
}
@keyframes cbPulse {
    0%   { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ────────── Popup ────────── */
.cb-popup {
    width: 340px;
    background: rgba(18, 18, 18, 0.92);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 215, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.contact-badge.active .cb-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ────────── Header ────────── */
.cb-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.07) 0%, rgba(255, 215, 0, 0.02) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Avatar */
.cb-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.cb-avatar span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: var(--dark);
    letter-spacing: 0.05em;
}
.cb-avatar-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2.5px solid #121212;
}

/* Header text */
.cb-header-text {
    flex: 1;
    min-width: 0;
}
.cb-name {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.cb-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.cb-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
}

/* Close */
.cb-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.cb-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ────────── Content ────────── */
.cb-content {
    padding: 22px;
}

/* Chat bubble */
.cb-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px 16px 16px 4px;
    padding: 16px 18px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 20px;
}

/* Info rows */
.cb-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cb-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.25s ease;
}
a.cb-info-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
.cb-info-item i {
    color: var(--gold);
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.cb-info-item span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 300;
}
a.cb-info-item:hover span {
    color: var(--text-primary);
}

/* ────────── Footer / Action Buttons ────────── */
.cb-footer {
    display: flex;
    gap: 10px;
    padding: 0 22px 22px;
}
.cb-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 16px;
    border-radius: 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
}
.cb-action i {
    font-size: 1.05rem;
}

/* Call button — gold, matches site */
.cb-action-call {
    background: var(--gold);
    color: var(--dark);
}
.cb-action-call:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.25);
}

/* WhatsApp button — subtle dark style */
.cb-action-wa {
    background: rgba(37, 211, 102, 0.12);
    color: #25D366;
    border: 1px solid rgba(37, 211, 102, 0.15);
}
.cb-action-wa:hover {
    background: rgba(37, 211, 102, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.15);
}

/* ────────── Responsive ────────── */
@media (max-width: 768px) {
    .contact-badge {
        bottom: 20px;
        right: 16px;
    }
    .cb-trigger {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }
    .cb-popup {
        width: calc(100vw - 32px);
        max-width: 340px;
    }
}