/**
 * FCT Feedback Popup — Frontend Styles
 * assets/feedback.css
 */

/* ============================================================
   POPUP WRAPPER
   ============================================================ */
.fct-fb-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.fct-fb-popup.fct-fb-visible {
    display: flex;
    animation: fct-fb-fade-in 0.25s ease;
}

@keyframes fct-fb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   BACKDROP
   ============================================================ */
.fct-fb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ============================================================
   BOX
   ============================================================ */
.fct-fb-box {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.1);
    text-align: center;
    animation: fct-fb-pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
}

@keyframes fct-fb-pop-in {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Close button */
.fct-fb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s ease;
    padding: 0;
}

.fct-fb-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* ============================================================
   STEP PANELS
   ============================================================ */
.fct-fb-step {
    display: none;
    animation: fct-fb-fade-in 0.2s ease;
}

.fct-fb-step.active {
    display: block;
}

/* Emoji at top */
.fct-fb-emoji {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.fct-fb-box h3 {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.fct-fb-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 22px;
    line-height: 1.55;
}

/* ============================================================
   STARS
   ============================================================ */
.fct-fb-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 14px;
}

.fct-fb-star {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    line-height: 0;
    transition: transform 0.12s ease;
}

.fct-fb-star:hover {
    transform: scale(1.15);
}

.fct-fb-star svg {
    width: 36px;
    height: 36px;
    fill: #e2e8f0;
    transition: fill 0.15s ease;
    display: block;
}

.fct-fb-star.fct-fb-hovered svg,
.fct-fb-star.fct-fb-selected svg {
    fill: #f59e0b;
}

.fct-fb-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 16px;
    min-height: 18px;
    font-weight: 500;
}

/* "Maybe later" skip link */
.fct-fb-skip {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.fct-fb-skip:hover {
    color: #475569;
    background: #f8fafc;
}

/* ============================================================
   COMMENT TEXTAREA (Step 2)
   ============================================================ */
#fct-fb-comment {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #0f172a;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
    line-height: 1.5;
}

#fct-fb-comment:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

#fct-fb-comment::placeholder {
    color: #94a3b8;
}

/* ============================================================
   ACTION BUTTONS
   ============================================================ */
.fct-fb-actions {
    display: flex;
    gap: 10px;
}

.fct-fb-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.18s ease;
    letter-spacing: 0.01em;
    line-height: 1;
}

.fct-fb-btn-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.fct-fb-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.fct-fb-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.fct-fb-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Standalone thank you button */
.fct-fb-step-3 .fct-fb-btn-primary,
.fct-fb-step-4 .fct-fb-btn-primary {
    margin-top: 8px;
    min-width: 140px;
    padding: 12px 28px;
}

/* ============================================================
   SHARE BUTTONS (Step 4 - High rating)
   ============================================================ */
.fct-fb-share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.fct-fb-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 10px;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1;
}

.fct-fb-share:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
    transform: translateY(-1px);
}

.fct-fb-share.fct-fb-copied {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 480px) {
    .fct-fb-box {
        padding: 28px 22px 22px;
        border-radius: 16px;
    }

    .fct-fb-box h3 {
        font-size: 1.1rem;
    }

    .fct-fb-emoji {
        font-size: 40px;
    }

    .fct-fb-star svg {
        width: 32px;
        height: 32px;
    }

    .fct-fb-share-grid {
        grid-template-columns: 1fr;
    }
}
