/**
 * form-success-popup.css
 * Beautiful animated success/error popup shown after form submissions.
 * Included in contact.php and index.php via a <link> or <style> tag.
 */

/* ── Overlay ──────────────────────────────────────────────────────────────── */
.fsuccess-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 5, 8, 0.60);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}
.fsuccess-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

/* ── Modal card ────────────────────────────────────────────────────────────── */
.fsuccess-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 32px 80px rgba(0,0,0,.22), 0 0 0 1px rgba(190,24,93,.07);
    transform: translateY(28px) scale(.95);
    transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
    opacity: 0;
}
.fsuccess-overlay.is-open .fsuccess-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ── Icon circle ───────────────────────────────────────────────────────────── */
.fsuccess-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fsuccess-icon.success-icon { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.fsuccess-icon.error-icon   { background: linear-gradient(135deg, #ffe4e6, #fecdd3); }

.fsuccess-icon svg {
    width: 38px;
    height: 38px;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.fsuccess-icon.success-icon svg { stroke: #059669; }
.fsuccess-icon.error-icon svg   { stroke: #e11d48; }

/* SVG stroke draw animation */
.fsuccess-icon svg .check-path,
.fsuccess-icon svg .x-path1,
.fsuccess-icon svg .x-path2 {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    transition: stroke-dashoffset .5s cubic-bezier(.4,0,.2,1) .25s;
}
.fsuccess-overlay.is-open .fsuccess-icon svg .check-path,
.fsuccess-overlay.is-open .fsuccess-icon svg .x-path1,
.fsuccess-overlay.is-open .fsuccess-icon svg .x-path2 {
    stroke-dashoffset: 0;
}

/* ── Text content ──────────────────────────────────────────────────────────── */
.fsuccess-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px;
    line-height: 1.2;
}
.fsuccess-message {
    font-size: .9rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 28px;
}

/* ── Progress bar (auto-dismiss) ───────────────────────────────────────────── */
.fsuccess-progress {
    height: 3px;
    background: #f0f0f0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 22px;
}
.fsuccess-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #be185d, #c9a96e);
    border-radius: 99px;
    width: 100%;
    transform-origin: left;
    animation: shrink-bar 4s linear forwards;
}
@keyframes shrink-bar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.fsuccess-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.fsuccess-btn {
    padding: 11px 22px;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.fsuccess-btn:hover { transform: translateY(-1px); }
.fsuccess-btn-primary {
    background: linear-gradient(135deg, #be185d, #9d174d);
    color: #fff;
    box-shadow: 0 4px 14px rgba(190,24,93,.35);
}
.fsuccess-btn-primary:hover { box-shadow: 0 6px 20px rgba(190,24,93,.45); }
.fsuccess-btn-ghost {
    background: #f5f5f5;
    color: #555;
}
.fsuccess-btn-ghost:hover { background: #eee; }

/* ── Confetti particles (success only) ─────────────────────────────────────── */
.fsuccess-confetti {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 20px;
}
.confetti-piece {
    position: absolute;
    top: -10px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 0;
    animation: confetti-fall 1.2s ease-out forwards;
}
@keyframes confetti-fall {
    0%   { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
    100% { opacity: 0; transform: translateY(140px) rotate(540deg) scale(.5); }
}

/* ── Close button ──────────────────────────────────────────────────────────── */
.fsuccess-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #888;
    transition: background .15s, color .15s, transform .15s;
}
.fsuccess-close:hover { background: #ffe4e6; color: #e11d48; transform: rotate(90deg); }

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .fsuccess-card { padding: 32px 20px 24px; border-radius: 16px; }
    .fsuccess-title { font-size: 1.3rem; }
    .fsuccess-btn { padding: 10px 18px; }
}
