/* v63: final mobile-only edge-to-edge interactive-question options.
   Keeps desktop/tablet untouched. The option letter and option text now use
   stable A/B/C/D mapping from backend v63, so the UI does not attach the
   wrong letter to the right answer. */
@media (max-width: 767px) {
    html,
    body {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Keep the question card itself safe inside the post, but allow the option
       rail to use the full phone width like a native/Facebook-style action area. */
    [data-interactive-question-card].ft-iq-card {
        max-width: 100% !important;
        overflow-x: visible !important;
    }

    [data-interactive-question-card] form[data-interactive-question-form],
    [data-interactive-question-card] [data-iq-guest-options] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    [data-interactive-question-card] [data-iq-options-list],
    [data-interactive-question-card] [data-iq-guest-options] {
        display: grid !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        gap: .6rem !important;
        overflow: visible !important;
    }

    [data-interactive-question-card] [data-iq-option-label].ft-iq-option,
    [data-interactive-question-card] a[data-iq-login-required].ft-iq-option,
    [data-interactive-question-card] .ft-iq-option {
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-radius: 0 !important;
        padding: 1rem 1rem !important;
        min-height: 4.75rem !important;
        display: flex !important;
        align-items: center !important;
        box-shadow: none !important;
    }

    [data-interactive-question-card] [data-iq-option-label].ft-iq-option:first-child,
    [data-interactive-question-card] [data-iq-guest-options] a.ft-iq-option:first-child {
        border-top-left-radius: .95rem !important;
        border-top-right-radius: .95rem !important;
    }

    [data-interactive-question-card] [data-iq-option-label].ft-iq-option:last-child,
    [data-interactive-question-card] [data-iq-guest-options] a.ft-iq-option:last-child {
        border-bottom-left-radius: .95rem !important;
        border-bottom-right-radius: .95rem !important;
    }

    [data-interactive-question-card] .ft-iq-option-letter {
        width: 2.45rem !important;
        height: 2.45rem !important;
        min-width: 2.45rem !important;
    }

    [data-interactive-question-card] .ft-iq-option span.min-w-0,
    [data-interactive-question-card] [data-iq-option-label] span.min-w-0,
    [data-interactive-question-card] a[data-iq-login-required] span.min-w-0 {
        font-size: 1rem !important;
        line-height: 1.5rem !important;
        overflow-wrap: anywhere !important;
    }

    /* Keep result boxes readable; do not force them to full viewport width. */
    [data-interactive-question-card] .ft-iq-result,
    [data-interactive-question-card] .ft-iq-answer,
    [data-interactive-question-card] .ft-iq-explanation {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}
