/* ============================================================
   mobile-app.css — FindFyre phone layout polish
   Loaded last from Site.Master. Desktop (≥769px) is untouched.
   ============================================================ */

@media (max-width: 768px) {

    /* ── Shared page clearance above the icon-only tab bar ─── */

    /* ── Settings / dashboard / posts / people / banking / payments
          inherit .settings.new-setting .container from settings-redesign.
          Extra tap-target polish lives here so those pages keep their
          desktop rules. ─────────────────────────────────────────────── */

    body.fp-light .settings.new-setting .fs-verify-mini {
        border-color: rgba(10, 48, 73, 0.10);
        background: #f6f7f9;
    }

    .fd-mobile-chips a {
        min-height: 44px;
        padding: 0 16px;
    }

    .fd-check-row .fd-btn-primary {
        min-height: 44px;
        padding: 10px 18px;
    }

    .settings.fd-posts-view .ffp-kind {
        min-height: 44px;
        padding: 0 14px;
    }

    .settings.fd-posts-view .ffp-actions a,
    .settings.fd-posts-view .ffp-actions button {
        min-height: 44px;
        padding: 0 14px;
    }

    .settings.fd-posts-view .ffp-row {
        padding: 12px;
    }

    .settings.fd-people-view .ff-people-list-card {
        padding: 18px 16px 12px;
    }

    .settings.new-setting .fb-price {
        height: 48px;
        padding: 4px;
    }

    .settings.new-setting .fb-price-btn {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .wallet-modal .wallet-modal-content {
        margin: 16px;
        max-width: calc(100% - 32px);
    }

    .wallet-modal .wallet-amount-btn {
        min-height: 44px;
    }

    /* ── Create post ─────────────────────────────────────────── */
    .settings.new-setting.create-post-page .container {
        padding: 16px 16px var(--fp-page-bottom, calc(52px + env(safe-area-inset-bottom, 0px) + 16px)) !important;
        padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    }

    .create-post-page .fcp-tips-summary {
        min-height: 44px;
    }

    .create-post-page .fcp-confirm-back {
        min-height: 44px;
        height: auto;
    }

    .create-post-page .fcp-price-btn {
        width: 44px;
        height: 44px;
    }

    .create-post-page .fcp-tag-pill {
        min-height: 44px;
    }

    .create-post-page .fcp-tag-chip {
        min-height: 44px;
        height: auto;
    }

    .create-post-page .fcp-tag-chip-remove,
    .create-post-page .fcp-tags-clear {
        min-width: 44px;
        min-height: 44px;
    }

    /* ── Feed — cards already have 16px inner pad; clear the nav ─ */
    .bookmark-section {
        padding-top: 56px !important;
        padding-bottom: var(--fp-page-bottom, calc(52px + env(safe-area-inset-bottom, 0px) + 16px)) !important;
    }

    .bookmark-section .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 8px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .bookmark-section .bookmark-wrap .profile-follow.subscribe-head {
        padding: 0 16px !important;
        margin: 0 0 10px 0 !important;
        box-sizing: border-box;
    }

    body.ff-dark .bookmark-section .following-content p,
    body.ff-dark .bookmark-section .tab-para,
    body.ff-dark .bookmark-section .profile-details p,
    body.ff-dark .bookmark-section .following-text,
    body.ff-dark .fp-mobile-shell .tab-para,
    body.ff-dark .fp-mobile-shell .following-content p {
        color: #fff !important;
    }

    body.fp-light .bookmark-section .following-content p,
    body.fp-light .bookmark-section .tab-para,
    body.fp-light .bookmark-section .profile-details p {
        color: var(--text-primary) !important;
    }

    body.ff-dark .bookmark-section .bookmark-profile .comment-name {
        color: #fff !important;
    }

    body.ff-dark .fp-mobile-feed-header,
    body.ff-dark .fp-mobile-feed-header h2 {
        color: #fff !important;
    }

    body.ff-dark .fp-mobile-feed-header .fp-feed-action-btn {
        color: #fff !important;
    }

    /* Send-message popup — white title, card layout, 16px field */
    body.ff-dark #fp-message-popup .fp-modal-title {
        color: #fff !important;
    }

    #fp-message-popup.fp-msg-modal {
        width: calc(100% - 32px);
        max-width: 400px;
        padding: 22px 18px 18px;
        border-radius: 16px;
    }

    #fp-message-popup .fp-modal-close {
        width: 40px;
        height: 40px;
        color: #fff;
    }

    #fp-message-popup .fp-modal-textarea {
        min-height: 128px;
        font-size: 16px;
        border-radius: 12px;
    }

    #fp-message-popup .fp-modal-action-btn {
        height: 48px;
        margin-top: 14px;
        border-radius: 12px;
    }

    body.fp-light #fp-message-popup .fp-modal-title {
        color: #0a3049 !important;
    }

    /* ── Messages ───────────────────────────────────────────── */
    .message-section .container {
        padding: 10px 12px calc(var(--fp-bottom-nav-height, 52px) + 10px) !important;
        padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
    }

    /* ── Notifications ───────────────────────────────────────── */
    .fnp-notif-main {
        padding-bottom: 0;
    }

    .notif-page .container.fnp-wrap {
        padding: 16px 16px var(--fp-page-bottom, calc(52px + env(safe-area-inset-bottom, 0px) + 16px)) !important;
        padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    }

    .fnp-toolbar {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .notif-page .notif-feed .fnp-item {
        min-height: 56px;
        padding: 12px 8px 12px 8px !important;
    }

    /* ── Discover / find creators ──────────────────────────── */
    .findcreator-page.ff-content {
        padding-bottom: var(--fp-page-bottom, calc(52px + env(safe-area-inset-bottom, 0px) + 16px));
    }

    .findcreator-page .ff-content-inner {
        padding: 16px 16px 32px;
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    .fc-filters-open-btn {
        min-width: 50px;
        width: 50px;
        min-height: 50px;
        padding: 0 !important;
        background: var(--pink) !important;
        color: #fff !important;
        border-radius: 12px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 0;
    }

    .fc-filters-open-btn span {
        display: none !important;
    }

    .fc-popular-chip {
        min-height: 28px;
        padding: 4px 10px;
        font-size: 11px;
    }

    .fc-interpreted-chip {
        min-height: 36px;
    }

    .fc-photo-info {
        padding: 14px 12px 12px;
    }

    .findcreator-page .fc-grid {
        gap: 12px;
    }

    .findcreator-page .fc-grid .ff-creator-card {
        border-radius: 14px;
        overflow: hidden;
    }

    .ff-discover-page.ff-content,
    .findcreator-page.ff-discover-page {
        padding-bottom: var(--fp-page-bottom, calc(52px + env(safe-area-inset-bottom, 0px) + 16px));
    }

    .ff-discover-inner {
        width: min(1120px, calc(100% - 32px));
        padding: 18px 0 calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .ff-discover-btn {
        min-height: 44px;
    }

    /* ── Help centre ───────────────────────────────────────── */
    .ffhelp,
    .ffhelp-page,
    .ffna {
        padding-bottom: var(--fp-page-bottom, calc(52px + env(safe-area-inset-bottom, 0px) + 16px));
    }

    .ffhelp-chip {
        min-height: 44px;
    }

    .ffhelp-search-clear {
        width: 44px;
        height: 44px;
    }

    .ffhelp-back {
        min-height: 44px;
    }

    /* ── Fan + creator profiles ───────────────────────────────── */
    .fnp-wrapper {
        padding-bottom: var(--fp-page-bottom, calc(52px + env(safe-area-inset-bottom, 0px) + 16px));
    }

    .fnp-btn-primary,
    .fnp-btn-ghost,
    .fnp-btn-icon {
        min-height: 44px;
        height: 44px;
    }

    .crp-wrapper {
        padding-bottom: var(--fp-page-bottom, calc(52px + env(safe-area-inset-bottom, 0px) + 16px));
    }

    .crp-btn-follow,
    .crp-btn-message,
    .crp-btn-icon {
        min-height: 44px;
        height: 44px;
    }

    .crp-tags {
        flex-wrap: wrap;
        overflow: visible;
        padding-left: 0;
        padding-right: 0;
    }

    .fp-mobile-profile-card {
        padding-left: 16px;
        padding-right: 16px;
        min-width: 0;
    }

    .fp-mobile-attr-tags,
    .fp-mobile-flavour-tags,
    .fp-tags-wrap {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        overflow: visible !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .fp-mobile-about-card,
    .fp-mobile-count-tabs {
        margin-left: 16px;
        margin-right: 16px;
    }

    /* ── Login / register ──────────────────────────────────── */
    .ff-login-panel {
        padding-bottom: calc(var(--fp-bottom-nav-height, 52px) + 12px);
        padding-left: 20px;
        padding-right: 20px;
    }

    html:has(.ff-register-page),
    body:has(.ff-register-page) {
        overflow: auto !important;
        height: auto !important;
        max-height: none !important;
    }

    .ff-register-page.ff-login-page {
        height: auto !important;
        min-height: 100dvh;
        overflow: visible !important;
        padding-top: calc(56px + env(safe-area-inset-top, 0px));
    }

    .ff-register-page .ff-login-panel {
        justify-content: flex-start !important;
        overflow: visible !important;
        flex: none;
        align-items: stretch;
        padding: 20px 16px calc(var(--fp-bottom-nav-height, 52px) + env(safe-area-inset-bottom, 0px) + 40px) !important;
        padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    }

    .ff-register-page .ff-login-panel-logo {
        display: none !important;
    }

    .ff-register-page .ff-login-panel::before,
    .ff-register-page .ff-login-panel::after {
        display: none !important;
    }

    /* Profile Follow + Message: equal cells, override style.css .follow-btn */
    .fp-mobile-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px;
        margin-top: 14px;
        margin-bottom: 12px;
        width: 100%;
    }

    .fp-mobile-actions > .fp-action-btn,
    .fp-mobile-actions > .fp-action-btn.follow-btn,
    .fp-mobile-actions > a.fp-action-btn {
        width: 100% !important;
        min-width: 0;
        margin: 0 !important;
        height: 48px;
        padding: 0 12px !important;
        font-family: inherit;
        font-size: 14px !important;
        font-weight: 700;
        text-transform: none;
        letter-spacing: 0.02em;
        box-sizing: border-box;
        border-radius: 10px;
    }

    .ff-pwd-toggle {
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* ── Creator signup ────────────────────────────────────── */
    .rc-container {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    .rc-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .rc-btn-remove-link {
        width: 44px;
        height: 44px;
    }

    /* ── Share / referral ───────────────────────────────────── */
    #ffshare-closeX {
        width: 44px;
        height: 44px;
    }

    #ffref-footer button {
        min-height: 44px;
        padding: 10px 12px;
    }

    /* ── Landing (no app tab bar; keep copy off the glass edge) ─ */
    .ff-hero {
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 480px) {
    .findcreator-page .ff-content-inner {
        padding: 14px 16px 28px;
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 380px) {
    .ff-hero {
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .ff-footer .ff-form-inner,
    .ff-bullets {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
