/* Floating contact buttons (bottom right, every page) */
#fsm-contact-widget {
    position: fixed;
    right: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: Inter-SemiBold, Inter-Regular, sans-serif;
}

#fsm-cw-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 22px 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.97rem;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#fsm-cw-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.38);
}

#fsm-cw-toggle:focus-visible,
.fsm-cw-item:focus-visible {
    outline: 3px solid #0080FF;
    outline-offset: 3px;
}

.fsm-cw-toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
}

.fsm-cw-toggle-icon svg {
    width: 100%;
    height: 100%;
}

.fsm-cw-close {
    display: none;
}

#fsm-contact-widget.is-open .fsm-cw-open { display: none; }
#fsm-contact-widget.is-open .fsm-cw-close { display: flex; }

/* Menu */
#fsm-cw-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

#fsm-contact-widget.is-open #fsm-cw-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fsm-cw-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.fsm-cw-label {
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14);
    white-space: nowrap;
}

.fsm-cw-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #1e3a5f;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
    transition: transform 0.18s ease;
}

.fsm-cw-icon svg {
    width: 22px;
    height: 22px;
}

.fsm-cw-item:hover .fsm-cw-icon {
    transform: scale(1.08);
}

/* Mobile: round button only, closer to the edge */
@media (max-width: 576px) {
    #fsm-contact-widget {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    #fsm-cw-toggle {
        width: 56px;
        padding: 0;
        justify-content: center;
    }

    .fsm-cw-toggle-text {
        display: none;
    }
}

@media print {
    #fsm-contact-widget { display: none; }
}
