﻿/**
 * Floating Contact Button VDW - Pure CSS (no JS, no overlay, no menu box)
 * Click FAB -> CTA circle buttons float up from bottom
 */

/* === Widget Container === */
.fcv-contact-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1002;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
}

/* Hide checkbox toggle */
.fcv-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* === FAB Button (label) === */
.fcv-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    outline: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10;
    padding: 0;
    margin: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.fcv-fab:hover {
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
}

.fcv-fab:active {
    transform: scale(0.92);
}

/* === Icon switch (chat <-> close) === */
.fcv-icon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: #ffffff;
    font-size: 24px;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcv-icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.fcv-icon-chat {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* === FAB when open === */
.fcv-toggle-input:checked ~ .fcv-fab {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    box-shadow: 0 8px 15px rgba(96, 165, 250, 0.35);
}

.fcv-toggle-input:checked ~ .fcv-fab .fcv-icon-chat {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.fcv-toggle-input:checked ~ .fcv-fab .fcv-icon-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* === Contact List (circle buttons floating above) === */
.fcv-contact-list {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

/* Each contact item hidden by default */
.fcv-contact-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #063924;
    padding: 6px;

    /* Hidden - float up when toggled */
    opacity: 0;
    transform: translateY(20px) scale(0.5);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    flex-shrink: 0;
}

.fcv-contact-item:hover {
    transform: translateY(0) scale(1.1) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* === When checked: show buttons from bottom up === */
.fcv-toggle-input:checked ~ .fcv-contact-list .fcv-contact-item {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Stagger animation */
.fcv-toggle-input:checked ~ .fcv-contact-list .fcv-contact-item:nth-child(1) { transition-delay: 0s; }
.fcv-toggle-input:checked ~ .fcv-contact-list .fcv-contact-item:nth-child(2) { transition-delay: 0.05s; }
.fcv-toggle-input:checked ~ .fcv-contact-list .fcv-contact-item:nth-child(3) { transition-delay: 0.1s; }
.fcv-toggle-input:checked ~ .fcv-contact-list .fcv-contact-item:nth-child(4) { transition-delay: 0.15s; }
.fcv-toggle-input:checked ~ .fcv-contact-list .fcv-contact-item:nth-child(5) { transition-delay: 0.2s; }
.fcv-toggle-input:checked ~ .fcv-contact-list .fcv-contact-item:nth-child(6) { transition-delay: 0.25s; }

/* When closing, hide faster without stagger */
.fcv-contact-item {
    transition-delay: 0s !important;
}

/* Social Icon / Image */
.fcv-contact-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

/* Messenger: remove background so SVG gradient blends naturally */
.fcv-contact-item[title="Facebook"] {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 4px;
}

/* Gray circle placeholder */
.fcv-no-icon {
    width: 48px;
    height: 48px;
    background: #d1d5db;
    border-radius: 50%;
    display: block;
}

/* === Responsive === */
@media (max-width: 480px) {
    .fcv-contact-widget {
        bottom: 20px;
        right: 20px;
    }
}
