/* ── Feedback modal (Lifestoria design system) ───────────────────────
   Shared by all four PostHog survey scripts (returning_visitor,
   deep_engagement, pricing_comparison_loop, onboarding_drop).
   Colors / typography follow shared/design-system.md.
*/

.ph-feedback-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    /* No backdrop so the modal feels like a polite suggestion,
       not a blocking dialog. */
}

.ph-feedback-overlay.active {
    display: block;
}

.ph-feedback-modal {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #FFFDF9;
    /* Warm white card on cream page; subtle gold-tinted border for warmth. */
    border: 1px solid #F0EBE3;
    border-radius: 16px;
    box-shadow:
        0 12px 40px rgba(15, 36, 64, 0.18),
        0 2px 6px rgba(15, 36, 64, 0.06);
    padding: 24px 22px 20px;
    z-index: 9999;
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    color: #2D2D2D;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.ph-feedback-modal.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Subtle gold accent strip on the left edge so it reads as on-brand. */
.ph-feedback-modal::before {
    content: '';
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #D4A574, #C4935F);
    opacity: 0.85;
}

.ph-feedback-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #4A4A4A;
    padding: 6px;
    line-height: 1;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.ph-feedback-close:hover {
    background: #F0EBE3;
    color: #1E3A5F;
}

.ph-feedback-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: #1E3A5F;
    margin: 0 0 14px;
    padding-right: 24px;
    line-height: 1.35;
}

.ph-feedback-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #F0EBE3;
    background: #FFFDF9;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #2D2D2D;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ph-feedback-choice:hover {
    border-color: #D4A574;
    background: #F5EDE4;
}

.ph-feedback-choice:has(input:checked) {
    border-color: #C4935F;
    background: #F5EDE4;
    box-shadow: 0 0 0 1px #C4935F inset;
}

.ph-feedback-choice input[type="radio"] {
    margin: 2px 0 0;
    accent-color: #C4935F;
    flex-shrink: 0;
}

.ph-feedback-divider {
    text-align: center;
    color: #4A4A4A;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 14px 0;
    position: relative;
}

.ph-feedback-divider::before,
.ph-feedback-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 24px);
    height: 1px;
    background: #F0EBE3;
}

.ph-feedback-divider::before { left: 0; }
.ph-feedback-divider::after  { right: 0; }

.ph-feedback-textarea,
.ph-feedback-input {
    width: 100%;
    border: 1px solid #F0EBE3;
    background: #FFFDF9;
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 14px;
    font-family: inherit;
    color: #2D2D2D;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ph-feedback-textarea::placeholder,
.ph-feedback-input::placeholder {
    color: #4A4A4A;
    opacity: 0.6;
}

.ph-feedback-textarea {
    resize: none;
    min-height: 84px;
    line-height: 1.5;
}

.ph-feedback-textarea:focus,
.ph-feedback-input:focus {
    outline: none;
    border-color: #D4A574;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.18);
}

.ph-feedback-input {
    margin-top: 10px;
}

.ph-feedback-submit {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #D4A574, #C4935F);
    color: #0F2440;
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    margin-top: 14px;
    box-shadow: 0 4px 14px rgba(212, 165, 116, 0.32);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.ph-feedback-submit:hover {
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.42);
    transform: translateY(-1px);
    filter: brightness(1.02);
}

.ph-feedback-submit:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(212, 165, 116, 0.3);
}

.ph-feedback-skip {
    background: none;
    border: none;
    color: #4A4A4A;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: 8px;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.ph-feedback-skip:hover {
    color: #1E3A5F;
    background: #F0EBE3;
}

.ph-feedback-message {
    font-size: 14px;
    color: #2D2D2D;
    line-height: 1.55;
    margin: 0 0 14px;
}

/* Compact spacing on small screens. */
@media (max-width: 480px) {
    .ph-feedback-modal {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        padding: 20px 18px 18px;
    }
}
