/* Float Contact Hotline - Public Stylesheet */

.fch-wrapper {
    position: fixed;
    bottom: var(--fch-bottom-distance, 20px);
    z-index: var(--fch-z-index, 9999);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.fch-wrapper.position-right {
    right: var(--fch-side-distance, 20px);
}

.fch-wrapper.position-left {
    left: var(--fch-side-distance, 20px);
}

/* Main Trigger Button */
.fch-trigger {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--fch-main-bg, #ff4b2b);
    border: none;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255, 75, 43, 0.35);
    color: #ffffff;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    padding: 0;
    margin: 0;
}

.fch-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 75, 43, 0.45);
}

.fch-trigger:active {
    transform: scale(0.95);
}

.fch-trigger-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.fch-trigger-icon img.fch-custom-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.fch-trigger-icon svg {
    width: 100%;
    height: 100%;
}

/* Pulse waves for the trigger button */
.fch-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--fch-main-bg, #ff4b2b);
    opacity: 0.6;
    z-index: 1001;
    pointer-events: none;
    transform: scale(1);
    animation: fch-pulse-anim 2s infinite cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fch-pulse-2 {
    animation-delay: 1s;
}

@keyframes fch-pulse-anim {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Sub-items Panel */
.fch-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.85);
    visibility: hidden;
    z-index: 1001;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.3s;
}

.fch-wrapper.active .fch-items {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* Individual Sub-item */
.fch-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

.fch-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.fch-item.messenger-item .fch-icon-wrapper {
    background: var(--fch-messenger-bg, #0084ff);
    box-shadow: 0 4px 12px rgba(0, 132, 255, 0.25);
}

.fch-item.zalo-item .fch-icon-wrapper {
    background: var(--fch-zalo-bg, #0068ff);
    box-shadow: 0 4px 12px rgba(0, 104, 255, 0.25);
}

.fch-item.phone-item .fch-icon-wrapper {
    background: var(--fch-phone-bg, #25d366);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.fch-item:hover .fch-icon-wrapper {
    transform: scale(1.08);
}

.fch-item.messenger-item:hover .fch-icon-wrapper {
    box-shadow: 0 6px 16px rgba(0, 132, 255, 0.35);
}

.fch-item.zalo-item:hover .fch-icon-wrapper {
    box-shadow: 0 6px 16px rgba(0, 104, 255, 0.35);
}

.fch-item.phone-item:hover .fch-icon-wrapper {
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.fch-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.fch-icon-wrapper svg {
    width: 22px;
    height: 22px;
}

.fch-icon-wrapper svg.zalo-svg,
.fch-preview-icon svg.zalo-svg {
    width: 28px !important;
    height: auto !important;
}

/* Tooltip label styles */
.fch-label {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.fch-wrapper.position-right .fch-label {
    right: 62px;
    transform-origin: right center;
}

.fch-wrapper.position-left .fch-label {
    left: 62px;
    transform-origin: left center;
}

.fch-item:hover .fch-label {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Staggered entry transitions */
.fch-wrapper.active .fch-item:nth-child(1) {
    transition-delay: 0.05s;
}

.fch-wrapper.active .fch-item:nth-child(2) {
    transition-delay: 0.1s;
}

.fch-wrapper.active .fch-item:nth-child(3) {
    transition-delay: 0.15s;
}

/* Backwards transition delays when closing */
.fch-wrapper:not(.active) .fch-item:nth-child(1) {
    transition-delay: 0.1s;
}

.fch-wrapper:not(.active) .fch-item:nth-child(2) {
    transition-delay: 0.05s;
}

.fch-wrapper:not(.active) .fch-item:nth-child(3) {
    transition-delay: 0s;
}
