/* ─────────────────────────────────────────────
   WCP Sticky Floating Forms – Frontend Styles
   ───────────────────────────────────────────── */

/* ── Reset & Wrapper ── */
#wcp-sff-wrapper {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

/* ── Floating Action Button (Vertical Right Side) ── */
#wcp-sff-fab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 12px;
    border: none;
    border-radius: 10px 0 0 10px;
    background: linear-gradient(90deg, #f43f7a 0%, #e91e63 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    z-index: 99999;
    white-space: nowrap;
}

#wcp-sff-fab:hover {
    transform: translateY(-50%) translateX(-4px);
}

#wcp-sff-fab:active {
    transform: translateY(-50%) translateX(-2px);
}

#wcp-sff-fab:focus-visible {
    outline: 3px solid rgba(233, 30, 99, 0.5);
    outline-offset: 3px;
}

#wcp-sff-fab-icon {
    display: none;
}

#wcp-sff-fab-label {
    letter-spacing: 1.5px;
}

/* ── Overlay ── */
#wcp-sff-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 15, 25, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 1;
    transition: opacity 0.3s ease;
}

#wcp-sff-overlay.wcp-sff-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── Popup ── */
#wcp-sff-popup {
    position: relative;
    width: 92vw;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18),
                0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 36px 32px 32px;
    transform: translateY(0) scale(1);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease;
}

#wcp-sff-overlay.wcp-sff-hidden #wcp-sff-popup {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
}

/* Scrollbar styling */
#wcp-sff-popup::-webkit-scrollbar {
    width: 6px;
}
#wcp-sff-popup::-webkit-scrollbar-track {
    background: transparent;
}
#wcp-sff-popup::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

/* ── Close Button ── */
#wcp-sff-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    outline: none;
}

#wcp-sff-close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

#wcp-sff-close:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

#wcp-sff-close svg {
    width: 18px;
    height: 18px;
}

/* ── Header ── */
#wcp-sff-header {
    margin-bottom: 20px;
    padding-right: 40px; /* room for close button */
}

#wcp-sff-heading {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

#wcp-sff-intro {
    margin: 0;
    font-size: 14.5px;
    color: #6b7280;
    line-height: 1.6;
}

/* ── Form Wrapper ── */
#wcp-sff-form-wrap {
    min-height: 40px;
}

/* ── Compatibility: CF7 / Fluent Forms / WPForms ── */
#wcp-sff-form-wrap .wpcf7 form,
#wcp-sff-form-wrap .fluentform,
#wcp-sff-form-wrap .wpforms-container {
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    #wcp-sff-fab {
        padding: 20px 10px;
        font-size: 11px;
        letter-spacing: 1px;
    }

    #wcp-sff-popup {
        width: 94vw;
        max-height: 80vh;
        padding: 28px 20px 24px;
        border-radius: 16px;
    }

    #wcp-sff-heading {
        font-size: 19px;
    }
}

/* ── Pulse animation on load ── */
/* ── Success Message ── */
#wcp-sff-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 150px;
}

#wcp-sff-success.wcp-sff-hidden {
    display: none;
}

#wcp-sff-success svg {
    margin-bottom: 16px;
    animation: wcp-sff-check-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#wcp-sff-success-text {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

@keyframes wcp-sff-check-pop {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes wcp-sff-pulse {
    0%   { box-shadow: 2px 4px 16px rgba(233, 30, 99, 0.4), 1px 2px 6px rgba(0, 0, 0, 0.1); }
    50%  { box-shadow: 4px 6px 24px rgba(233, 30, 99, 0.6), 2px 4px 10px rgba(0, 0, 0, 0.12), 0 0 0 6px rgba(233, 30, 99, 0.12); }
    100% { box-shadow: 2px 4px 16px rgba(233, 30, 99, 0.4), 1px 2px 6px rgba(0, 0, 0, 0.1); }
}

#wcp-sff-fab.wcp-sff-animate {
    animation: wcp-sff-pulse 2s ease-in-out 1;
}
