/* ============================================================
   Per-Fin — shared dropdown/dialog theming.
   Consumed by both PerFinance.Web and PerFinance.App (MAUI) via
   _content/PerFinance.UI/pf-theme-shared.css, loaded before each
   project's own stitch-theme.css so per-project rules still win
   where needed. Relies on the --pf-* / --rz-* variables each
   project's stitch-theme.css defines at :root.
   ============================================================ */

/* Search/filter box inside a dropdown panel (was white text on white). */
.rz-dropdown-filter, .rz-dropdown-filter-container input {
    background: var(--surface-container-low) !important;
    color: var(--pf-text) !important;
    border: 1px solid var(--pf-border) !important;
    border-radius: 0.4rem !important;
}
.rz-dropdown-filter::placeholder {
    color: var(--pf-text-dim) !important;
}

/* Import review: card-payment rows whose transfer source isn't picked yet — amber call-out. */
.pf-needs-transfer.rz-dropdown {
    border: 1.5px solid var(--pf-warning) !important;
    background: rgba(255, 210, 122, 0.12) !important;
    box-shadow: 0 0 0 2px rgba(255, 210, 122, 0.28) !important;
}

/* PortfolioSelector in header */
.pf-header-selector .rz-dropdown { min-width: 200px; border-radius: 9999px !important; }

/* ---------- Responsive dialogs (PfDialog presets) ----------
   Below 640px every PfDialog-sized dialog goes full-bleed: the dialog fills the
   viewport, only the content region scrolls, and the titlebar stays pinned. */
@media (max-width: 640px) {
    .rz-dialog.pf-dialog {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
    }
    .rz-dialog.pf-dialog .rz-dialog-titlebar {
        flex: 0 0 auto;
    }
    .rz-dialog.pf-dialog .rz-dialog-content {
        flex: 1 1 auto;
        overflow-y: auto;
    }
}
