/*
 * Fixonic responsive foundation.
 *
 * This file is intentionally loaded after page-specific styles. It provides one
 * predictable final layout layer while the earlier marketplace styles are
 * consolidated over time.
 */

:root {
    --fx-mobile-nav-clearance: calc(112px + env(safe-area-inset-bottom));
    --fx-mobile-page-gutter: clamp(12px, 4vw, 20px);
    --fx-readable-width: 760px;
}

html {
    max-width: 100%;
    overflow-x: clip;
    scroll-padding-bottom: var(--fx-mobile-nav-clearance);
}

body,
main,
main > *,
.shell,
section,
article,
form,
fieldset {
    min-width: 0;
}

img,
picture,
video,
canvas,
iframe {
    max-width: 100%;
}

input,
select,
textarea,
button {
    min-width: 0;
    max-width: 100%;
}

:is(
    .app-page-header,
    .app-account-header,
    .app-draft-main,
    .app-search-save-row,
    .app-saved-search-main,
    .app-saved-seller-list article,
    .app-selling-card-list article,
    .checkout-hero-row,
    .checkout-section-title,
    .order-row,
    .project-page-header,
    .project-detail-header,
    .project-section-heading
) > * {
    min-width: 0;
}

:is(
    h1,
    h2,
    h3,
    p,
    a,
    strong,
    small,
    label,
    dt,
    dd,
    .message,
    .app-account-header,
    .checkout-card,
    .order-summary-card
) {
    overflow-wrap: anywhere;
}

.reservation-clock {
    flex: 0 0 190px;
    min-width: 190px;
}

.reservation-clock strong {
    white-space: nowrap;
    overflow-wrap: normal;
    font-variant-numeric: tabular-nums;
}

/* All django-allauth pages inherit the Fixonic shell through the layout
 * override. Keep the complete entrance and account-management flow usable on
 * laptops and phones instead of falling back to the package's plain HTML. */
.app-auth-route main {
    width: min(calc(100% - 32px), 560px);
    margin: clamp(30px, 6vw, 82px) auto;
    padding: clamp(24px, 4vw, 42px);
    overflow: hidden;
    border: 1px solid var(--fx-line-strong);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0, rgba(168, 255, 96, .09), transparent 18rem),
        linear-gradient(145deg, rgba(20, 29, 42, .98), rgba(8, 12, 18, .99));
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.app-auth-route main::before {
    content: "FIXONIC SECURE ACCOUNT";
    display: block;
    margin-bottom: 13px;
    color: var(--fx-cyan);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.app-auth-route main h1 {
    margin: 0 0 12px;
    color: var(--fx-text);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.app-auth-route main h2,
.app-auth-route main h3 {
    color: var(--fx-text);
}

.app-auth-route main p {
    color: var(--fx-text-soft);
    line-height: 1.55;
}

.app-auth-route main > p:first-of-type {
    margin-top: 0;
    color: var(--fx-muted);
}

.app-auth-route main a {
    color: var(--fx-cyan);
    font-weight: 700;
}

.app-auth-route main a:hover {
    color: var(--fx-lime);
}

.app-auth-route main form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.app-auth-route main form > p,
.app-auth-route main form > div {
    min-width: 0;
    margin: 0;
}

.app-auth-route main form > p {
    display: grid;
    gap: 8px;
}

.app-auth-route main form label {
    color: var(--fx-text-soft);
    font-size: .82rem;
    font-weight: 700;
}

.app-auth-route main input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.app-auth-route main select,
.app-auth-route main textarea {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    color: var(--fx-text);
    border: 1px solid var(--fx-line-strong);
    border-radius: 12px;
    outline: 0;
    background: #0a0f16;
    font: inherit;
}

.app-auth-route main input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.app-auth-route main select:focus,
.app-auth-route main textarea:focus {
    border-color: rgba(67, 217, 255, .72);
    box-shadow: 0 0 0 3px rgba(67, 217, 255, .09);
}

.app-auth-route main form > p:has(input[type="checkbox"]),
.app-auth-route main form > p:has(input[type="radio"]) {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.app-auth-route main input[type="checkbox"],
.app-auth-route main input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--fx-lime);
}

.app-auth-route main button[type="submit"] {
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    color: #061015;
    border: 1px solid rgba(67, 217, 255, .45);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--fx-cyan), var(--fx-blue));
    box-shadow: 0 12px 28px rgba(36, 108, 255, .2);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.app-auth-route main button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--fx-lime), var(--fx-cyan));
}


.app-auth-route main button[form="resend"] {
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    color: var(--fx-text);
    border: 1px solid var(--fx-line-strong);
    border-radius: 12px;
    background: var(--fx-panel-2);
    box-shadow: none;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.app-auth-route main button[form="resend"]:hover {
    color: var(--fx-cyan);
    border-color: rgba(67, 217, 255, .62);
    background: color-mix(in srgb, var(--fx-cyan) 10%, var(--fx-panel));
}

.app-auth-route main button[form="resend"]:focus-visible,
.app-auth-route main button[type="submit"]:focus-visible {
    outline: 3px solid rgba(67, 217, 255, .25);
    outline-offset: 2px;
}

.app-auth-route main button:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.app-auth-route main .errorlist {
    margin: 0;
    padding: 12px 14px;
    color: #ffd9de;
    border: 1px solid rgba(255, 93, 108, .34);
    border-radius: 10px;
    background: rgba(255, 93, 108, .1);
    list-style: none;
}

.app-auth-route main hr {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid var(--fx-line);
}

.app-auth-route main table {
    width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
}

@media (min-width: 901px) and (max-width: 1180px) {
    .market-utility {
        font-size: .68rem;
    }

    .market-utility-row,
    .market-utility-left,
    .market-utility-right {
        min-width: 0;
        gap: 10px;
    }

    .market-utility .utility-greeting {
        display: none;
    }

    .market-header-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 10px;
    }

    .shop-category-link {
        display: none;
    }

    .brand-fixonic {
        min-width: 160px;
    }

    .header-search-market {
        grid-template-columns: minmax(0, 1fr) 128px;
    }

    .market-search-button {
        min-width: 106px;
        padding-inline: 16px;
    }

    .market-category-row {
        justify-content: flex-start;
        gap: clamp(10px, 1.45vw, 17px);
        font-size: .74rem;
    }
}

@media (max-width: 900px) {
    body {
        min-width: 0;
        padding-bottom: var(--fx-mobile-nav-clearance);
    }

    main {
        width: 100%;
        overflow: clip;
    }

    .shell {
        width: 100%;
        margin-inline: auto;
        padding-inline: var(--fx-mobile-page-gutter);
    }

    .app-mobile-header {
        width: 100%;
        gap: 11px;
        padding: calc(9px + env(safe-area-inset-top)) var(--fx-mobile-page-gutter) 11px;
    }

    .app-mobile-header > * {
        width: min(100%, 780px);
        margin-inline: auto;
    }

    .app-mobile-brand-row,
    .app-mobile-header-actions,
    .app-mobile-brand,
    .app-mobile-search {
        min-width: 0;
    }

    .app-mobile-brand {
        flex: 1 1 auto;
    }

    .app-mobile-brand strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-mobile-header-actions {
        flex: 0 0 auto;
    }

    .app-mobile-search {
        height: 50px;
    }

    .app-bottom-nav {
        left: 50%;
        right: auto;
        width: min(calc(100% - 20px), 560px);
        min-height: 72px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        justify-content: stretch;
        padding: 7px;
        transform: translateX(-50%);
    }

    .app-bottom-nav a {
        width: 100%;
        min-width: 0;
        height: 58px;
        padding-inline: 2px;
    }

    .app-bottom-nav a > span:last-child {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-bottom-nav svg,
    .app-bottom-nav .app-bottom-search svg {
        width: 25px;
        height: 25px;
    }

    /* The earlier mobile sheet stylesheet forces this backdrop to
     * display:block. Safari therefore lets the transparent, hidden element
     * cover the viewport and intercept every tap on the Search page. Keep it
     * out of hit testing until the filter sheet is visibly open. */
    .app-filter-backdrop {
        pointer-events: none;
    }

    .app-filter-backdrop[hidden] {
        display: none !important;
    }

    .app-filter-backdrop.is-visible {
        pointer-events: auto;
    }

    .app-listing-cta {
        bottom: calc(94px + env(safe-area-inset-bottom));
        width: min(calc(100% - 20px), 560px);
        margin-inline: auto;
    }

    .app-route-detail {
        padding-bottom: calc(190px + env(safe-area-inset-bottom));
    }

    .app-route-detail .app-similar-feed,
    .app-route-detail .app-related-guides {
        padding-bottom: 24px;
    }

    .app-filter-chip-row,
    .app-shortcuts,
    .app-category-rail,
    .app-product-rail,
    .app-guide-rail,
    .app-selling-status-tabs,
    .app-saved-tabs,
    .app-thumbnail-row {
        scroll-padding-inline: var(--fx-mobile-page-gutter);
        scroll-snap-type: inline proximity;
        overscroll-behavior-inline: contain;
    }

    :is(
        .app-filter-chip-row,
        .app-shortcuts,
        .app-category-rail,
        .app-product-rail,
        .app-guide-rail,
        .app-selling-status-tabs,
        .app-saved-tabs,
        .app-thumbnail-row
    ) > * {
        scroll-snap-align: start;
    }

    .app-page-header {
        gap: 14px;
        padding-top: 18px;
    }

    .app-page-header h1,
    .project-page-header h1,
    .project-detail-header h1,
    .project-form-header h1,
    .checkout-hero h1 {
        font-size: clamp(1.85rem, 8vw, 2.55rem);
        line-height: 1.06;
        letter-spacing: -.04em;
    }

    .app-search-save-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .app-search-save-row > div span {
        max-width: none;
        white-space: normal;
    }

    .app-seller-stats,
    .app-account-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-seller-stats a,
    .app-account-metrics a {
        min-height: 74px;
        align-content: center;
        padding: 13px 10px;
        border-bottom: 1px solid var(--fx-line);
    }

    .app-seller-stats a:nth-child(2),
    .app-account-metrics a:nth-child(2),
    .app-seller-stats a:last-child,
    .app-account-metrics a:last-child {
        border-right: 0;
    }

    .app-seller-stats a:nth-last-child(-n + 2),
    .app-account-metrics a:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .app-seller-stats strong,
    .app-account-metrics strong {
        font-size: 1.25rem;
    }

    .app-seller-stats span,
    .app-account-metrics span {
        font-size: .7rem;
        line-height: 1.35;
    }

    .app-delivery-window {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-wizard-form,
    .app-account-hub,
    .app-sell-hub,
    .app-notification-page,
    .app-preferences-page,
    .project-form-card {
        width: min(100%, var(--fx-readable-width));
        margin-inline: auto;
    }

    .app-wizard-card,
    .app-detail-card,
    .checkout-card,
    .order-summary-card,
    .project-plan-section,
    .project-side-card {
        max-width: 100%;
    }

    .app-wizard-actions {
        bottom: calc(10px + env(safe-area-inset-bottom));
        grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    }

    .app-wizard-actions .button {
        min-height: 48px;
        white-space: normal;
    }

    .app-saved-search-main,
    .app-selling-card-list article {
        grid-template-columns: 48px minmax(0, 1fr) auto;
    }

    .app-account-header h1,
    .app-account-header p,
    .app-draft-copy strong,
    .app-saved-search-main strong,
    .app-selling-card-list h2 {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-account-header p,
    .app-draft-copy strong,
    .app-saved-search-main strong,
    .app-selling-card-list h2 {
        white-space: nowrap;
    }

    .checkout-layout,
    .payout-layout {
        width: min(100%, 820px);
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding-top: 20px;
        padding-bottom: var(--fx-mobile-nav-clearance);
    }

    .checkout-hero {
        padding-block: 30px;
    }

    .checkout-hero-row {
        align-items: stretch;
    }

    .checkout-section-title {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 12px;
    }

    .checkout-card input:not([type="checkbox"]):not([type="radio"]),
    .checkout-card select,
    .checkout-card textarea,
    .checkout-card .address-form > .button,
    .order-summary-card .buy-now-form > .button {
        width: 100%;
    }

    .order-summary-card {
        position: static;
        grid-row: 1;
    }

    body.app-route-checkout {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    body.app-route-checkout .app-bottom-nav {
        display: none !important;
    }

    body.app-route-checkout .checkout-layout {
        padding-bottom: calc(34px + env(safe-area-inset-bottom));
    }

    .project-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-summary-strip > div {
        min-width: 0;
    }

    .project-detail-actions,
    .project-form-actions,
    .project-compatibility-actions {
        flex-wrap: wrap;
    }

    .project-detail-actions form,
    .project-plan-item-head form {
        min-width: 0;
    }
}

@media (min-width: 720px) and (max-width: 900px) {
    :is(.app-results-grid, .app-explore-grid, .app-saved-grid) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .app-sell-type-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .app-results-grid,
    .app-explore-grid,
    .app-feed-heading,
    .app-filter-chip-row {
        padding-inline: 24px;
    }

    .checkout-layout,
    .payout-layout {
        padding-inline: 24px;
    }
}

@media (max-width: 520px) {
    .app-auth-route main {
        width: calc(100% - 24px);
        margin: 18px auto 34px;
        padding: 21px;
        border-radius: 18px;
    }

    .app-auth-route main h1 {
        font-size: clamp(1.9rem, 10vw, 2.55rem);
    }

    .app-page-header,
    .app-notification-header,
    .app-preferences-header {
        display: grid;
    }

    .app-page-header .app-header-link,
    .app-notification-settings-link {
        justify-self: start;
        white-space: normal;
    }

    .app-search-save-row {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .app-search-saved-button {
        width: 100%;
        white-space: normal;
    }

    .app-wizard-actions {
        position: static;
        grid-template-columns: minmax(0, 1fr);
    }

    .app-wizard-actions .button {
        width: 100%;
    }

    .app-review-list a,
    .app-account-activity-list a,
    .app-preference-row {
        gap: 12px;
    }

    .app-saved-seller-list article {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .app-saved-seller-list article > button,
    .app-saved-seller-list article > form {
        grid-column: 1 / -1;
        width: 100%;
    }

    .app-saved-seller-list button,
    .app-follow-seller {
        width: 100%;
    }

    .app-draft-main {
        grid-template-columns: 52px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .app-draft-thumb {
        width: 52px;
        height: 52px;
    }

    .app-draft-card form button {
        padding-inline: 10px;
    }

    .checkout-card,
    .order-summary-card {
        padding: 17px;
        border-radius: 16px;
    }

    .checkout-card .form-grid,
    .checkout-card .form-grid-2,
    .checkout-card .form-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .provider-pending,
    .provider-ready {
        padding: 17px;
    }

    .project-card-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .project-card-actions a + a {
        border-left: 0;
        border-top: 1px solid #303834;
        padding-top: 12px;
    }
}

@media (max-width: 374px) {
    :root {
        --fx-mobile-page-gutter: 12px;
    }

    .app-mobile-brand-row {
        gap: 8px;
    }

    .app-mobile-brand {
        gap: 7px;
    }

    .app-mobile-mark {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        font-size: .66rem;
    }

    .app-mobile-brand strong {
        font-size: 1rem;
        letter-spacing: .08em;
    }

    .app-mobile-header-actions {
        gap: 5px;
    }

    .app-icon-button {
        width: 38px;
        height: 38px;
    }

    .app-icon-button svg {
        width: 21px;
        height: 21px;
    }

    .app-mobile-search {
        height: 48px;
        gap: 8px;
        padding-inline: 12px;
    }

    .app-mobile-search input {
        font-size: .94rem;
    }

    .app-bottom-nav {
        width: calc(100% - 12px);
        bottom: calc(6px + env(safe-area-inset-bottom));
        min-height: 68px;
        padding: 5px;
    }

    .app-bottom-nav a {
        height: 56px;
        gap: 2px;
        font-size: .57rem;
    }

    .app-bottom-nav svg,
    .app-bottom-nav .app-bottom-search svg {
        width: 23px;
        height: 23px;
    }

    :is(.app-results-grid, .app-explore-grid, .app-saved-grid) {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    :is(.app-results-grid, .app-explore-grid) .app-listing-card {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
    }

    :is(.app-results-grid, .app-explore-grid) .app-listing-card .listing-card-media {
        width: 116px;
        height: 116px;
        aspect-ratio: 1;
    }

    :is(.app-results-grid, .app-explore-grid) .app-listing-card .listing-card-body {
        padding-top: 2px;
    }

    .app-listing-cta {
        left: 6px;
        right: 6px;
        width: auto;
        gap: 8px;
        padding-left: 12px;
    }

    .app-listing-cta .button {
        min-width: 116px;
        padding-inline: 12px;
    }

    .app-wizard-header {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .app-wizard-progress small {
        display: none;
    }

    .app-wizard-card,
    .checkout-card,
    .order-summary-card,
    .project-plan-section {
        padding: 15px;
    }

    .app-choice-card {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 14px;
    }

    .app-choice-card > i {
        display: none;
    }

    .app-account-header {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 17px;
    }

    .app-account-header > a {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .app-selling-card-list article {
        grid-template-columns: 66px minmax(0, 1fr) auto;
        gap: 9px;
    }

    .app-selling-card-media {
        width: 66px;
        height: 66px;
    }

    .checkout-section-title {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;
    }

    .checkout-section-title > span {
        width: 32px;
        height: 32px;
    }

    .project-summary-strip > div {
        padding: 14px;
    }
}

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
    :root {
        --fx-mobile-nav-clearance: calc(82px + env(safe-area-inset-bottom));
    }

    .app-mobile-brand-row {
        display: none;
    }

    .app-mobile-header {
        padding-top: max(7px, env(safe-area-inset-top));
    }

    .app-bottom-nav {
        min-height: 60px;
        bottom: calc(5px + env(safe-area-inset-bottom));
    }

    .app-bottom-nav a {
        height: 48px;
    }

    .app-bottom-nav a > span:last-child {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .app-main-image {
        height: min(72dvh, 520px);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}


/* Fixonic social authentication */
.app-auth-route main .fx-social-auth {
    margin: 22px 0 6px;
}

.app-auth-route main .fx-social-auth-list {
    display: grid;
    gap: 10px;
}

.app-auth-route main form.fx-social-auth-form {
    display: block;
    margin: 0;
}

.app-auth-route main .fx-social-auth-form--google { order: 1; }
.app-auth-route main .fx-social-auth-form--apple { order: 2; }
.app-auth-route main .fx-social-auth-form--facebook { order: 3; }

.app-auth-route main button.fx-social-auth-button[type="submit"],
.app-auth-route main a.fx-social-auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    color: #111827;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: none;
    font-size: .95rem;
    font-weight: 750;
}

.app-auth-route main button.fx-social-auth-button[type="submit"]:hover,
.app-auth-route main a.fx-social-auth-button:hover {
    color: #111827;
    border-color: rgba(168, 255, 96, .75);
    background: #f6f8fb;
}

.fx-social-auth-mark {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    color: #111827;
    border: 1px solid #d8dde7;
    background: #ffffff;
    font-size: .85rem;
    font-weight: 900;
    line-height: 1;
}

.fx-social-auth-button--facebook .fx-social-auth-mark {
    color: #1877f2;
    font-family: Arial, sans-serif;
    font-size: 1rem;
}

.fx-social-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0;
    color: var(--fx-muted);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.fx-social-auth-divider::before,
.fx-social-auth-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: var(--fx-line);
}

.fx-social-auth-divider span {
    flex: 0 0 auto;
}

@media (max-width: 520px) {
    .app-auth-route main button.fx-social-auth-button[type="submit"] {
        min-height: 50px;
        font-size: .9rem;
    }
}


.fx-social-auth-link {
    text-decoration: none;
    box-sizing: border-box;
}

.fx-passkey-auth-mark {
    font-size: 1rem;
}


/* Auth branding + verification action polish */
.app-auth-route main .fx-social-auth-list {
    gap: 14px;
}

.app-auth-route main button.fx-social-auth-button[type="submit"],
.app-auth-route main a.fx-social-auth-button {
    min-height: 58px;
    color: #f7f9fc;
    border: 1px solid #38465a;
    background: #111925;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
}

.app-auth-route main button.fx-social-auth-button[type="submit"]:hover,
.app-auth-route main a.fx-social-auth-button:hover {
    color: #fff;
    border-color: #5f8ee8;
    background: #172234;
}

.fx-social-auth-icon-shell {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: #fff;
}

.fx-social-auth-icon {
    display: block;
    width: 19px;
    height: 19px;
}

.fx-social-auth-icon-shell--passkey {
    color: #101828;
    border: 1px solid #d9e0ea;
}

.fx-passkey-auth-icon {
    width: 21px;
    height: 21px;
    fill: #111827;
}

/* django-allauth confirmation pages render their action group as a plain div.
 * Give each action breathing room and visually separate secondary actions. */
.app-auth-route main form > div:has(> button),
.app-auth-route main form > div:has(> a) {
    display: grid;
    gap: 14px;
}

.app-auth-route main form > div:has(> button) > button,
.app-auth-route main form > div:has(> a) > a {
    margin: 0;
}

.app-auth-route main button[form="resend"] {
    color: var(--fx-text);
    border: 1px solid var(--fx-line-strong);
    background: var(--fx-panel-2);
    box-shadow: none;
}

.app-auth-route main button[form="resend"]:hover {
    color: var(--fx-cyan);
    border-color: var(--fx-cyan);
    background: color-mix(in srgb, var(--fx-cyan) 10%, var(--fx-panel));
}

.app-auth-route main button[form="logout-from-stage"],
.app-auth-route main form > div > a {
    color: var(--fx-muted);
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
}

.app-auth-route main button[form="logout-from-stage"]:hover,
.app-auth-route main form > div > a:hover {
    color: var(--fx-text);
    border-color: var(--fx-line);
    background: var(--fx-panel-2);
}

@media (max-width: 520px) {
    .app-auth-route main button.fx-social-auth-button[type="submit"],
    .app-auth-route main a.fx-social-auth-button {
        min-height: 56px;
        font-size: .96rem;
    }
}


/* 2026-09-25 phone feed correction.
   Large phones need readable listing rows rather than two cramped columns. */
@media (max-width: 480px) {
    :is(.app-results-grid, .app-explore-grid, .app-saved-grid) {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
    }

    :is(.app-results-grid, .app-explore-grid) .app-listing-card {
        display: grid !important;
        grid-template-columns: 124px minmax(0, 1fr) !important;
        gap: 12px !important;
        align-items: start !important;
        padding: 10px !important;
    }

    :is(.app-results-grid, .app-explore-grid) .app-listing-card .listing-card-media {
        width: 124px !important;
        height: 124px !important;
        aspect-ratio: 1 !important;
    }

    :is(.app-results-grid, .app-explore-grid) .app-listing-card .listing-card-body {
        min-width: 0 !important;
        padding-top: 1px !important;
    }

    :is(.app-results-grid, .app-explore-grid) .app-listing-card h3 {
        min-height: 0 !important;
        margin-bottom: 5px !important;
        font-size: .92rem !important;
        line-height: 1.28 !important;
    }

    :is(.app-results-grid, .app-explore-grid) .app-listing-card .app-card-meta,
    :is(.app-results-grid, .app-explore-grid) .app-listing-card .delivery-note {
        font-size: .72rem !important;
        line-height: 1.28 !important;
    }
}
