/* ForumX R36 — Guest Thread Polish
   Scope: guest thread pages only. Keeps the thread/post design intact. */

body.fx-guest-thread-page .page-shell {
    padding-bottom: 18px !important;
}

body.fx-guest-thread-page .fx-guest-reply {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 14px 0 0;
    padding: 15px 16px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
    border-radius: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--card)), color-mix(in srgb, var(--card) 94%, #07111d));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body.fx-guest-thread-page .fx-guest-reply-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #dceaff;
    background: color-mix(in srgb, var(--accent) 19%, var(--card-2));
    border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
}

body.fx-guest-thread-page .fx-guest-reply-icon .forumx-icon {
    width: 21px;
    height: 21px;
}

body.fx-guest-thread-page .fx-guest-reply-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

body.fx-guest-thread-page .fx-guest-reply-copy strong {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: -.01em;
}

body.fx-guest-thread-page .fx-guest-reply-copy > span {
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}

body.fx-guest-thread-page .fx-guest-reply-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

body.fx-guest-thread-page .fx-guest-reply-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 11px;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
    color: #e8f1ff;
    font-size: .82rem;
    font-weight: 780;
    line-height: 1;
    white-space: nowrap;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

body.fx-guest-thread-page .fx-guest-reply-button .forumx-icon {
    width: 17px;
    height: 17px;
}

body.fx-guest-thread-page .fx-guest-reply-button.is-login {
    background: color-mix(in srgb, var(--card-2) 88%, transparent);
}

body.fx-guest-thread-page .fx-guest-reply-button.is-register {
    color: #fff;
    border-color: color-mix(in srgb, var(--accent) 72%, #fff 8%);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #4ca2ff), color-mix(in srgb, var(--accent) 78%, #2156cb));
    box-shadow: 0 9px 22px color-mix(in srgb, var(--accent) 20%, transparent), inset 0 1px 0 rgba(255,255,255,.15);
}

body.fx-guest-thread-page .fx-guest-reply-button:hover,
body.fx-guest-thread-page .fx-guest-reply-button:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
}

/* Remove the old desktop-sized air gap between a short guest thread and footer. */
body.fx-guest-thread-page .site-footer.fx-footer.fx-footer-v19 {
    margin-top: 18px !important;
}

@media (max-width: 760px) {
    body.fx-guest-thread-page .page-shell {
        padding-top: 14px !important;
        padding-bottom: 10px !important;
    }

    body.fx-guest-thread-page .fx-guest-reply {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px 11px;
        margin-top: 10px;
        padding: 12px;
        border-radius: 14px;
    }

    body.fx-guest-thread-page .fx-guest-reply-icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    body.fx-guest-thread-page .fx-guest-reply-icon .forumx-icon {
        width: 19px;
        height: 19px;
    }

    body.fx-guest-thread-page .fx-guest-reply-copy strong {
        font-size: .94rem;
    }

    body.fx-guest-thread-page .fx-guest-reply-copy > span {
        font-size: .78rem;
        line-height: 1.4;
    }

    body.fx-guest-thread-page .fx-guest-reply-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
        gap: 8px;
        margin-top: 1px;
    }

    body.fx-guest-thread-page .fx-guest-reply-button {
        width: 100%;
        min-height: 40px;
        padding-inline: 10px;
        border-radius: 10px;
        font-size: .78rem;
    }

    /* Guest thread footer: keep navigation links, drop the large marketing/stat blocks. */
    body.fx-guest-thread-page .site-footer.fx-footer.fx-footer-v19 {
        margin-top: 12px !important;
        padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-shell {
        gap: 8px !important;
        padding-top: 14px !important;
        padding-bottom: 8px !important;
    }

    body.fx-guest-thread-page .fx-footer-pro-brand {
        padding-block: 2px 7px !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-brand {
        gap: 10px !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-brand-picture,
    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-brand-image,
    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-brand .brand-mark {
        width: 42px !important;
        height: 42px !important;
        flex-basis: 42px !important;
        border-radius: 12px !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-brand-copy strong {
        font-size: 1.02rem !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-brand-copy small {
        font-size: .76rem !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-grid {
        gap: 4px !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-card {
        border-radius: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-card-toggle {
        min-height: 46px !important;
        padding: 9px 7px !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-card-title {
        gap: 9px !important;
        font-size: .79rem !important;
    }

    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-card-title .forumx-icon,
    body.fx-guest-thread-page .fx-footer-v19 .fx-footer-card-chevron .forumx-icon {
        width: 17px !important;
        height: 17px !important;
    }

    body.fx-guest-thread-page .fx-footer-trust-row,
    body.fx-guest-thread-page .fx-footer-stat-row,
    body.fx-guest-thread-page .fx-footer-status-card {
        display: none !important;
    }

    body.fx-guest-thread-page .fx-footer-bottom.fx-footer-pro-bottom {
        min-height: 42px !important;
        margin-top: 2px !important;
        padding: 8px 2px !important;
        font-size: .68rem !important;
    }

    /* Keep footer content visibly above the fixed guest bottom navigation. */
    body.fx-guest-thread-page .mobile-bottom-nav {
        z-index: 90 !important;
    }
}

@media (max-width: 420px) {
    body.fx-guest-thread-page .fx-guest-reply-actions {
        grid-template-columns: 1fr 1.2fr;
    }

    body.fx-guest-thread-page .fx-guest-reply-button span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
