/* ============================================================
   FAB.CSS — FAB WhatsApp + modale form
   ============================================================ */

/* ---- FAB ---- */
.mc-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37,211,102,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mc-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37,211,102,0.5);
}

.mc-fab:active {
    transform: scale(0.96);
}

/* ---- OVERLAY ---- */
.mc-wa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0 28px 100px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mc-wa-overlay.mc-wa--visible {
    opacity: 1;
    pointer-events: auto;
}

/* ---- MODALE ---- */
.mc-wa-modal {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 360px;
    position: relative;
    transform: translateY(16px);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    overflow: hidden;
}

.mc-wa-overlay.mc-wa--visible .mc-wa-modal {
    transform: translateY(0);
}

/* Striscia verde in cima */
.mc-wa-modal::before {
    content: '';
    display: block;
    height: 4px;
    background: #25D366;
}

/* ---- CLOSE ---- */
.mc-wa-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--color-bg-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background 0.2s;
}

.mc-wa-modal__close:hover {
    background: var(--color-border);
}

/* ---- HEADER ---- */
.mc-wa-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 0;
}

.mc-wa-modal__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8faf0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mc-wa-modal__titolo {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

.mc-wa-modal__sub {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ---- BODY ---- */
.mc-wa-modal__body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mc-wa-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mc-wa-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.mc-wa-input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: var(--font-main);
    color: var(--color-text);
    background: #ffffff;
    transition: border-color 0.2s;
    outline: none;
    resize: none;
}

.mc-wa-input:focus {
    border-color: #25D366;
}

.mc-wa-input::placeholder {
    color: #bbb;
}

.mc-wa-textarea {
    line-height: 1.55;
}

/* ---- FOOTER ---- */
.mc-wa-modal__footer {
    padding: 0 20px 20px;
}

.mc-wa-modal__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #25D366;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: opacity 0.2s;
}

.mc-wa-modal__cta:hover {
    opacity: 0.88;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
    .mc-wa-overlay {
        align-items: flex-end;
        justify-content: center;
        padding: 0 0 88px;
    }

    .mc-wa-modal {
        max-width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .mc-fab {
        bottom: 20px;
        right: 20px;
    }
}