/* FP Quiz — Frontend styles
 * Brand: primary #E8336D (pink), secondary #0D1B4B (navy)
 * Codex: expand with full responsive quiz UI
 */

.fp-quiz-wrapper {
    max-width: 680px;
    margin: 0 auto;
    font-family: 'DM Sans', system-ui, sans-serif;
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px;
}

/* Theme-Reset: Astra erzwingt uppercase + letter-spacing auf Buttons/Labels.
   Innerhalb des Quiz immer normale Schreibweise. */
.fp-quiz-wrapper,
.fp-quiz-wrapper * {
    text-transform: none !important;
    letter-spacing: normal !important;
}

.fpq-loading {
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    color: #4b5563;
    font-size: 14px;
}

.fpq-inline-error {
    margin: 10px 0;
    padding: 12px 14px;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 14px;
}

/* Progress */
.fpq-progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}
.fpq-progress-fill {
    height: 100%;
    background: #E8336D;
    border-radius: 3px;
    transition: width 0.35s ease;
    width: 0%;
}
.fpq-progress-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 28px;
    text-align: right;
}

/* Question */
.fpq-question-text {
    font-size: 20px;
    font-weight: 700;
    color: #0D1B4B;
    margin-bottom: 24px;
    line-height: 1.4;
}

.fpq-question-subtext {
    margin: -10px 0 14px;
    font-size: 15px;
    line-height: 1.5;
    color: #4b5563;
}

.fpq-question-hint {
    margin: -10px 0 16px;
    font-size: 14px;
    color: #6b7280;
}

.fpq-question-hint--aux {
    margin: 8px 0 10px;
}

.fpq-question-hint--contact {
    margin: 2px 0 18px;
}

.fpq-other-text-wrap {
    margin-top: 12px;
}

.fpq-notes-detail-wrap {
    margin-top: 12px;
}

.fpq-contact-fields {
    display: grid;
    gap: 10px;
    margin-bottom: 8px;
}

/* Options */
.fpq-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}
.fpq-option:hover {
    border-color: #E8336D;
    background: #fef2f5;
}
.fpq-option.fpq-selected {
    border-color: #E8336D;
    background: #fef2f5;
}
.fpq-option.fpq-disabled {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}
.fpq-option-dot,
.fpq-option-check {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s;
}
.fpq-checkbox .fpq-option-check {
    border-radius: 5px;
}
.fpq-selected .fpq-option-dot,
.fpq-selected .fpq-option-check {
    border-color: #E8336D;
    background: #E8336D;
}
.fpq-selected .fpq-option-dot::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.fpq-selected .fpq-option-check::after {
    content: '';
    display: block;
    width: 6px;
    height: 11px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -58%) rotate(45deg);
}
.fpq-option-text {
    font-size: 16px;
    color: #1a1a2e;
}

/* Inputs */
.fpq-select,
.fpq-input,
.fpq-textarea,
.fpq-email-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a2e;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.fpq-select:focus,
.fpq-input:focus,
.fpq-textarea:focus,
.fpq-email-input:focus {
    border-color: #E8336D;
}
/* Select: Astra erzwingt oft eine zu kleine Höhe/line-height → Text abgeschnitten.
   Eigene Höhe + Platz für den Custom-Pfeil rechts. */
.fpq-select {
    height: auto;
    min-height: 52px;
    line-height: 1.5;
    padding-right: 44px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230D1B4B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
}

/* Navigation */
.fpq-nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    align-items: center;
}
.fpq-btn {
    padding: 13px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, opacity 0.15s;
}
.fpq-btn-next,
.fpq-btn-submit {
    background: #E8336D;
    color: #fff;
    margin-left: auto;
}
.fpq-btn-next:hover,
.fpq-btn-submit:hover { background: #c9285c; }
.fpq-btn-back {
    background: transparent;
    color: #888;
    border: 2px solid #e5e7eb;
}
.fpq-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Optin */
.fpq-optin {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    cursor: pointer;
}
.fpq-optin-check { margin-top: 2px; accent-color: #E8336D; }
.fpq-optin-text { font-size: 13px; color: #888; line-height: 1.5; }

/* Error */
.fpq-error {
    color: #e8336d;
    font-size: 13px;
    margin-top: 8px;
}

/* Success */
.fpq-success-msg {
    font-size: 18px;
    color: #0D1B4B;
    font-weight: 600;
    text-align: center;
    padding: 32px;
}

/* ------------------------------------------------------------------
   Intro screen
   ------------------------------------------------------------------ */
.fpq-intro {
    max-width: 680px;
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) 24px clamp(40px, 6vw, 72px);
    text-align: center;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.fpq-intro-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.fpq-intro-badge {
    display: inline-block;
    background: #fef2f5;
    color: #E8336D;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(232, 51, 109, 0.2);
}
.fpq-intro-title {
    font-size: clamp(26px, 5vw, 42px);
    font-weight: 800;
    color: #0D1B4B;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}
.fpq-intro-sub {
    font-size: clamp(15px, 2vw, 17px);
    color: #4b5563;
    line-height: 1.6;
    max-width: 500px;
    margin: 0;
}
.fpq-intro-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #E8336D;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    padding: 16px 36px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 12px 32px rgba(232, 51, 109, 0.30);
    letter-spacing: 0.01em;
    font-family: inherit;
}
.fpq-intro-btn:hover {
    background: #c9285a;
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(232, 51, 109, 0.36);
}
.fpq-intro-btn:active {
    transform: translateY(0);
}
.fpq-intro-trust {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
    margin: 0;
}

/* hide quiz until start button is clicked */
.fpq-hidden-until-start { display: none; }

/* ------------------------------------------------------------------
   Focus mode — hides WP header/footer when quiz is running
   ------------------------------------------------------------------ */
body.fpq-focus-mode #masthead,
body.fpq-focus-mode #colophon,
body.fpq-focus-mode .ast-scroll-top-icon,
body.fpq-focus-mode .ast-above-header-bar,
body.fpq-focus-mode .entry-title,
body.fpq-focus-mode .ast-breadcrumbs-wrap {
    display: none !important;
}
body.fpq-focus-mode .site-content {
    padding-top: 40px;
}
body.fpq-focus-mode .ast-container {
    max-width: 100%;
}

/* ------------------------------------------------------------------
   Quiz landing page (/quiz/) — hide default intro when landing wrap
   is present, and hide landing sections once quiz runs
   ------------------------------------------------------------------ */
.qlp-wrap ~ .fpq-intro { display: none !important; }
body.fpq-focus-mode .qlp-wrap { display: none !important; }

/* ------------------------------------------------------------------
   Responsive — Mobile
   ------------------------------------------------------------------ */
@media (max-width: 600px) {
    .fp-quiz-wrapper { padding: 0 14px; }

    .fpq-question-text { font-size: 19px; line-height: 1.35; }

    .fpq-option { padding: 13px 15px; gap: 10px; }
    .fpq-option-text { font-size: 15px; }

    .fpq-select,
    .fpq-input,
    .fpq-textarea,
    .fpq-email-input { font-size: 16px; padding: 12px 14px; } /* 16px verhindert iOS-Zoom */
    .fpq-select { padding-right: 42px; }

    /* Buttons: nebeneinander, aber nicht quetschen */
    .fpq-nav { gap: 10px; margin-top: 22px; }
    .fpq-btn { padding: 13px 20px; font-size: 15px; flex: 0 0 auto; }
    .fpq-btn-next,
    .fpq-btn-submit { flex: 1 1 auto; max-width: 60%; }

    .fpq-intro-title { font-size: clamp(23px, 7vw, 32px); }
}

@media (max-width: 380px) {
    .fpq-btn { padding: 12px 16px; font-size: 14px; }
    .fpq-option-text { font-size: 14.5px; }
}
