/* ============================================================
   Menevo Wallet — Phase 2 (read-only)
   Shared stylesheet loaded by profile.html (tab "Wallet").
   Palette: --text #003E54 · --bg #FDF3D7 · --accent #F9CD2D
   ============================================================ */

.menevo-wallet {
    font-family: inherit;
    color: #003E54;
    padding: 1.25rem 0 2rem;
}

/* ── Header ────────────────────────────────────────────── */
.menevo-wallet .wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}
.menevo-wallet .wallet-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #003E54;
}
.menevo-wallet .wallet-title strong { font-weight: 700; }
.menevo-wallet .wallet-title svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.menevo-wallet .wallet-summary {
    font-size: 0.75rem;
    color: rgba(0, 62, 84, 0.55);
}

/* ── Search ────────────────────────────────────────────── */
.menevo-wallet .wallet-search {
    position: relative;
    margin-bottom: 1rem;
}
.menevo-wallet .wallet-search .search-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    stroke: rgba(0, 62, 84, 0.5);
    fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
    pointer-events: none;
}
.menevo-wallet .wallet-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1.5px solid rgba(0, 62, 84, 0.15);
    border-radius: 10px;
    background: white;
    font-family: inherit;
    font-size: 0.875rem;
    color: #003E54;
    outline: none;
    transition: border-color 0.15s;
}
.menevo-wallet .wallet-search input:focus { border-color: #003E54; }
.menevo-wallet .wallet-search input::placeholder { color: rgba(0, 62, 84, 0.4); }

/* ── Mobile tab switcher ──────────────────────────────── */
.menevo-wallet .wallet-tabs-mobile {
    display: none;
    background: #003E54;
    padding: 0.25rem;
    border-radius: 10px;
    gap: 2px;
    margin-bottom: 0.875rem;
}
.menevo-wallet .wallet-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.625rem 0.5rem;
    background: transparent;
    color: rgba(253, 243, 215, 0.65);
    border: none;
    border-radius: 7px;
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 120ms, color 120ms;
}
.menevo-wallet .wallet-tab.active {
    background: #FDF3D7;
    color: #003E54;
    font-weight: 500;
}
.menevo-wallet .wallet-tab .tab-count {
    font-size: 0.625rem;
    opacity: 0.65;
}

/* ── 3-column grid ─────────────────────────────────────── */
.menevo-wallet .wallet-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}
.menevo-wallet .wallet-col {
    background: white;
    border-radius: 12px;
    border: 0.5px solid rgba(0, 62, 84, 0.1);
    padding: 0.875rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: 20rem;
}
.menevo-wallet .wallet-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.menevo-wallet .wallet-col-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #003E54;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.menevo-wallet .wallet-col-title svg {
    width: 14px; height: 14px;
    stroke: currentColor; fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.menevo-wallet .wallet-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    font-size: 0.6875rem;
    font-family: inherit;
    font-weight: 600;
    color: #003E54;
    background: rgba(0, 62, 84, 0.06);
    border: none;
    border-radius: 999px;
    cursor: pointer;
}
.menevo-wallet .wallet-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.menevo-wallet .wallet-coming-soon-badge {
    font-size: 0.5625rem;
    letter-spacing: 0.12em;
    color: rgba(0, 62, 84, 0.5);
    padding: 3px 8px;
    background: rgba(249, 205, 45, 0.18);
    border-radius: 999px;
    font-weight: 600;
}

/* ── Empty state ───────────────────────────────────────── */
.menevo-wallet .wallet-col-empty {
    display: none;
    padding: 1.25rem 0.5rem;
    font-size: 0.75rem;
    color: rgba(0, 62, 84, 0.45);
    font-style: italic;
    text-align: center;
}

/* ── List + Row ────────────────────────────────────────── */
.menevo-wallet .wallet-col-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.menevo-wallet .wallet-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s;
}
.menevo-wallet .wallet-row:hover {
    background: rgba(0, 62, 84, 0.04);
}
.menevo-wallet .wallet-row-icon {
    flex-shrink: 0;
    width: 2rem; height: 2rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.menevo-wallet .wallet-row-icon.pdf   { background: #FEE2E2; color: #C63030; }
.menevo-wallet .wallet-row-icon.jpg   { background: #DCFCE7; color: #1C8C4F; }
.menevo-wallet .wallet-row-icon.doc   { background: #E0E7FF; color: #4338CA; }
.menevo-wallet .wallet-row-icon.other { background: rgba(0, 62, 84, 0.08); color: #003E54; }
.menevo-wallet .wallet-row-body {
    flex: 1;
    min-width: 0;
}
.menevo-wallet .wallet-row-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #003E54;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.menevo-wallet .wallet-row-meta {
    font-size: 0.625rem;
    color: rgba(0, 62, 84, 0.55);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.menevo-wallet .wallet-meta-sep { opacity: 0.5; }
.menevo-wallet .wallet-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.menevo-wallet .wallet-tag--day      { background: rgba(91, 155, 213, 0.15); color: #3F6F96; }
.menevo-wallet .wallet-tag--personal { background: rgba(249, 205, 45, 0.22); color: #715400; }
.menevo-wallet .wallet-row-kebab {
    flex-shrink: 0;
    width: 26px; height: 26px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(0, 62, 84, 0.35);
    cursor: pointer;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.menevo-wallet .wallet-row-kebab:disabled {
    cursor: not-allowed;
}
.menevo-wallet .wallet-row-kebab svg {
    width: 14px; height: 14px;
    fill: currentColor;
}

/* ── Trip dividers in the Trips column ─────────────────── */
.menevo-wallet .wallet-trip-divider {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 4px 4px;
    margin-top: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    color: rgba(0, 62, 84, 0.65);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    border-top: 1px dashed rgba(0, 62, 84, 0.12);
}
.menevo-wallet .wallet-trip-divider:first-child { border-top: none; }
.menevo-wallet .divider-chevron {
    width: 10px; height: 10px;
    stroke: currentColor; fill: none; stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round;
    transition: transform 0.15s;
}
.menevo-wallet .wallet-trip-divider.collapsed .divider-chevron {
    transform: rotate(-90deg);
}
.menevo-wallet .divider-range {
    font-weight: 500;
    color: rgba(0, 62, 84, 0.45);
    letter-spacing: 0.04em;
}
.menevo-wallet .divider-count {
    margin-left: auto;
    font-weight: 500;
    color: rgba(0, 62, 84, 0.45);
}

/* ── Cards column (coming soon teaser) ─────────────────── */
.menevo-wallet .wallet-col--coming-soon {
    background: linear-gradient(180deg, #fff 0%, rgba(253, 243, 215, 0.5) 100%);
}
.menevo-wallet .wallet-cards-teaser {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding-top: 4px;
}
.menevo-wallet .wallet-card-ghost {
    width: 100%;
    max-width: 14rem;
    aspect-ratio: 1.6 / 1;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0.85;
}
.menevo-wallet .ghost-brand {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}
.menevo-wallet .ghost-tier {
    font-size: 0.6875rem;
    opacity: 0.85;
}
.menevo-wallet .wallet-cards-teaser-msg {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 0.6875rem;
    color: rgba(0, 62, 84, 0.7);
    text-align: center;
    line-height: 1.4;
}
.menevo-wallet .wallet-cards-teaser-msg strong {
    color: #003E54;
    font-weight: 700;
}
.menevo-wallet .wallet-cards-teaser-msg span {
    display: block;
    font-size: 0.5625rem;
    color: rgba(0, 62, 84, 0.5);
    margin-top: 2px;
}

/* ── Mobile breakpoint ────────────────────────────────── */
@media (max-width: 48em) {
    .menevo-wallet .wallet-tabs-mobile { display: flex; }
    .menevo-wallet .wallet-columns { grid-template-columns: 1fr; }
    .menevo-wallet .wallet-col { display: none; min-height: 16rem; }
    .menevo-wallet .wallet-col.mobile-active { display: flex; }
    .menevo-wallet .wallet-col--coming-soon { min-height: 18rem; }
    .menevo-wallet .wallet-header { justify-content: flex-start; }
}

/* ============================================================
   Phase 3 — Add / Edit / Delete modals + kebab menu
   ============================================================ */

/* Overlay + card shell (shared by Add/Edit and Delete) */
.mv-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 62, 84, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    /* travel-planner-detail.html has .sidebar-panel.open at z:1050,
       .panel-backdrop (mobile) at z:1999, and other modals at z:10000.
       Sit above all of them so click events reach the modal card. */
    z-index: 10001;
    padding: 16px;
}
.mv-modal-overlay[hidden] { display: none; }

.mv-modal-card {
    background: #FDF3D7;
    border-radius: 14px;
    padding: 20px 22px;
    width: 420px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    font-family: inherit;
    color: #003E54;
    box-shadow: 0 10px 30px rgba(0, 62, 84, 0.2);
}
.mv-modal-card--small { width: 360px; }

.mv-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.mv-modal-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}
.mv-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mv-modal-close:hover { background: rgba(0, 62, 84, 0.06); }

/* Fields */
.mv-field { margin-bottom: 14px; }
.mv-label {
    display: block;
    font-size: 11px;
    color: rgba(0, 62, 84, 0.7);
    margin-bottom: 4px;
    font-weight: 500;
}
.mv-field input[type="text"],
.mv-field input[type="date"],
.mv-field input[type="file"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0, 62, 84, 0.15);
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    color: #003E54;
    background: white;
    box-sizing: border-box;
}
.mv-field input[type="file"] { padding: 6px 10px; }
.mv-field input:focus { outline: none; border-color: #003E54; }
.mv-field-hint {
    font-size: 10px;
    color: rgba(0, 62, 84, 0.55);
    margin-top: 4px;
}
.mv-field-error {
    font-size: 10px;
    color: #C63030;
    margin-top: 4px;
}

.mv-metadata[hidden] { display: none; }

/* File preview block (shows during Add after file pick; shows on Edit open with current file) */
.mv-file-preview {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 62, 84, 0.04);
    border-radius: 8px;
    align-items: center;
}
.mv-file-icon {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 6px;
    background: #FEE2E2;
    color: #C63030;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mv-file-icon.pdf   { background: #FEE2E2; color: #C63030; }
.mv-file-icon.jpg   { background: #DCFCE7; color: #1C8C4F; }
.mv-file-icon.doc   { background: #E0E7FF; color: #4338CA; }
.mv-file-icon.other { background: rgba(0, 62, 84, 0.08); color: #003E54; }

.mv-file-info { min-width: 0; }
.mv-file-name {
    font-size: 11px;
    font-weight: 500;
    color: #003E54;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mv-file-size {
    font-size: 10px;
    color: rgba(0, 62, 84, 0.55);
    margin-top: 2px;
}

/* Action bar at the bottom of the modal */
.mv-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 62, 84, 0.08);
}
.mv-btn-ghost,
.mv-btn-primary,
.mv-btn-danger {
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.15s, background 0.15s;
}
.mv-btn-ghost {
    background: transparent;
    border: 1px solid rgba(0, 62, 84, 0.15);
    color: #003E54;
}
.mv-btn-ghost:hover { background: rgba(0, 62, 84, 0.04); }
.mv-btn-primary {
    background: #F9CD2D;
    border: none;
    color: #003E54;
}
.mv-btn-primary:hover:not(:disabled) { filter: brightness(0.96); }
.mv-btn-primary:disabled {
    background: rgba(0, 62, 84, 0.1);
    color: rgba(0, 62, 84, 0.4);
    cursor: not-allowed;
}
.mv-btn-danger {
    background: #C63030;
    border: none;
    color: white;
}
.mv-btn-danger:hover:not(:disabled) { filter: brightness(0.93); }
.mv-btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }

/* Delete confirm messages */
.mv-delete-msg {
    font-size: 13px;
    color: #003E54;
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.mv-delete-warning {
    font-size: 11px;
    color: rgba(0, 62, 84, 0.7);
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.mv-delete-cascade {
    font-size: 11px;
    color: #92400E;
    background: rgba(249, 205, 45, 0.15);
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 2px solid #F9CD2D;
    margin: 10px 0 0 0;
    line-height: 1.4;
}

/* Kebab floating menu (single instance, position: fixed at click time) */
.mv-kebab-menu {
    position: fixed;
    background: white;
    border: 1px solid rgba(0, 62, 84, 0.15);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 62, 84, 0.12);
    padding: 4px 0;
    z-index: 10002;
    min-width: 140px;
    font-family: inherit;
}
.mv-kebab-menu[hidden] { display: none; }
.mv-kebab-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 12px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 11px;
    color: #003E54;
    cursor: pointer;
    text-align: left;
}
/* The above `display: flex` rule has higher specificity (0,1,1) than the
   UA `[hidden]{display:none}` (0,1,0), so without this override a button
   set via `b.hidden = true` would stay visible. Keep it: this is what
   guarantees mode-driven menus actually hide the wrong actions. */
.mv-kebab-menu button[hidden] { display: none; }
.mv-kebab-menu button:hover { background: rgba(0, 62, 84, 0.06); }
.mv-kebab-menu .mv-kebab-danger { color: #C63030; }
.mv-kebab-menu .mv-kebab-danger:hover { background: rgba(198, 48, 48, 0.08); }
.mv-kebab-divider {
    height: 1px;
    background: rgba(0, 62, 84, 0.1);
    margin: 4px 0;
}

/* Re-enable the kebab button cursor when not disabled (Phase 3 Core rows) */
.menevo-wallet .wallet-row-kebab:not(:disabled) { cursor: pointer; }
.menevo-wallet .wallet-row-kebab:not(:disabled):hover {
    background: rgba(0, 62, 84, 0.08);
    color: #003E54;
}

/* ============================================================
   Phase 4.1 / 4.2 — minimal adapters layered onto the legacy
   `.documents-container` / `.doc-category` panel CSS that lives
   in travel-planner-detail.css. We do NOT modify the legacy CSS;
   these rules only support the new bits introduced by the wallet
   rebuild:
     * a "Hidden in this trip (N)" collapsible at the bottom of
       the Personal box (no legacy equivalent)
     * a dimmed look for hidden Core docs
   The single "+ Add document" top button reuses the legacy
   `.save-document-btn` style — no new CSS needed for it.
   ============================================================ */

/* "Show hidden (N)" footer link inside the Personal box.
   Subtle navy underline link aligned to the right; hidden when count=0. */
.docs-show-hidden-row {
    display: flex;
    justify-content: flex-end;
    padding: 6px 8px 4px;
}
.docs-show-hidden-btn {
    background: transparent;
    border: none;
    color: rgba(0, 62, 84, 0.7);
    font-family: inherit;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 8px;
}
.docs-show-hidden-btn:hover { color: #003E54; }
.docs-show-hidden-btn[data-count="0"] { display: none; }

/* The kebab on .doc-item — reuses .wallet-row-kebab base, slot it
   into the existing .doc-action-btn footprint. */
.doc-item .wallet-row-kebab {
    background: transparent;
    border: none;
    width: 26px; height: 26px;
    border-radius: 6px;
    color: rgba(0, 62, 84, 0.5);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.doc-item .wallet-row-kebab:hover {
    background: rgba(0, 62, 84, 0.08);
    color: #003E54;
}

/* ============================================================
   Phase 4.2 — Modal extras (Day select, Share toggle) +
   filled attachment indicator + Attachment popover
   ============================================================ */

.mv-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0, 62, 84, 0.15);
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    color: #003E54;
    background: white;
    box-sizing: border-box;
}
.mv-field select:focus { outline: none; border-color: #003E54; }

/* Share toggle — checkbox dressed up */
.mv-toggle-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 62, 84, 0.04);
    border-radius: 8px;
    cursor: pointer;
}
.mv-toggle-label input[type="checkbox"] {
    margin: 2px 0 0 0;
    accent-color: #F9CD2D;
    width: 16px; height: 16px;
    flex-shrink: 0;
}
.mv-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.mv-toggle-title {
    font-size: 12px;
    font-weight: 600;
    color: #003E54;
}
.mv-toggle-hint {
    font-size: 10px;
    color: rgba(0, 62, 84, 0.55);
}

/* ── Filled attachment indicator on daily cards ──────── */
/* The legacy `.new-attachment-btn` markup ships untouched (its styling
   lives in travel-planner-detail.css and we DO NOT modify it).
   Phase 4.2 layers a single, additive class `.has-doc` that draws a
   small accent dot after the "Attachment" label. Empty → original look
   verbatim. Filled → original look + dot.
   We deliberately DO NOT use the legacy `.filled` class because that
   rule changes the button's bg/color, which is out of scope for the
   filled state per the Phase 4.2 design decision. */
.new-attachment-btn .attachment-dot {
    display: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #F9CD2D;
    flex-shrink: 0;
    margin-left: 4px;
}
.new-attachment-btn.has-doc .attachment-dot { display: inline-block; }

/* ── Floating attachment popover (Preview / Edit / Remove) */
.mv-attachment-popover {
    position: fixed;
    background: white;
    border: 1px solid rgba(0, 62, 84, 0.15);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 62, 84, 0.18);
    padding: 0;
    z-index: 10002;
    min-width: 200px;
    max-width: 260px;
    font-family: inherit;
    overflow: hidden;
}
.mv-attachment-popover[hidden] { display: none; }
.mv-attachment-popover-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(0, 62, 84, 0.04);
    border-bottom: 1px solid rgba(0, 62, 84, 0.1);
}
.mv-attachment-popover-name {
    font-size: 12px;
    font-weight: 500;
    color: #003E54;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.mv-attachment-popover-actions {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}
.mv-attachment-popover-actions button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 11px;
    color: #003E54;
    cursor: pointer;
    text-align: left;
}
.mv-attachment-popover-actions button[hidden] { display: none; }
.mv-attachment-popover-actions button:hover { background: rgba(0, 62, 84, 0.06); }
.mv-attachment-popover-actions .mv-kebab-danger { color: #C63030; }
.mv-attachment-popover-actions .mv-kebab-danger:hover { background: rgba(198, 48, 48, 0.08); }

/* ============================================================
   Phase 4.2 — Unhide modal (Show hidden Core docs in this trip)
   ============================================================ */
.mv-search-wrapper { margin-bottom: 8px; }
.mv-search-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0, 62, 84, 0.15);
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    color: #003E54;
    background: white;
    box-sizing: border-box;
}
.mv-search-input:focus { outline: none; border-color: #003E54; }
.mv-unhide-actions {
    display: flex;
    align-items: center;
    padding: 4px 4px 6px;
    border-bottom: 1px solid rgba(0, 62, 84, 0.08);
}
.mv-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(0, 62, 84, 0.85);
    cursor: pointer;
}
.mv-checkbox-label input[type="checkbox"] {
    margin: 0;
    accent-color: #003E54;
    cursor: pointer;
}
.mv-unhide-list {
    max-height: 320px;
    overflow-y: auto;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
}
.mv-unhide-row {
    display: flex;
    gap: 10px;
    padding: 8px;
    align-items: center;
    cursor: pointer;
    border-radius: 6px;
}
.mv-unhide-row:hover { background: rgba(0, 62, 84, 0.05); }
.mv-unhide-row input[type="checkbox"] {
    margin: 0;
    accent-color: #003E54;
    cursor: pointer;
    flex-shrink: 0;
}
.mv-unhide-row-info { min-width: 0; flex: 1; }
.mv-unhide-row-title {
    font-size: 12px;
    font-weight: 500;
    color: #003E54;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mv-unhide-row-meta {
    font-size: 10px;
    color: rgba(0, 62, 84, 0.55);
    margin-top: 2px;
}
.mv-unhide-empty {
    padding: 24px;
    text-align: center;
    color: rgba(0, 62, 84, 0.5);
    font-size: 12px;
    font-style: italic;
}

/* ============================================================
   Phase 5 — Shared-doc badge (small SVG glyph)
   Rendered next to the title on:
     * .doc-item (trip-detail sidebar panel rows)
     * .wallet-row[data-col="trips"] (wallet master Trips column)
   ============================================================ */
.mv-shared-badge {
    display: inline-block;
    vertical-align: middle;
    color: rgba(0, 62, 84, 0.55);
    margin-left: 6px;
    flex-shrink: 0;
    transition: color 0.15s;
}
.doc-item:hover .mv-shared-badge,
.wallet-row:hover .mv-shared-badge {
    color: #003E54;
}

/* ═══ Add-document modal — Menevo polish (scoped) ═══ */
/* ── modal «Aggiungi un documento» — palette v2 (ratifica 4 ago):
   white sand, dropzone al posto dell'input nativo, chip file col badge oro,
   NIENTE pillole (raggi 8-12px), Salva pieno deep ocean come il Tool 1. ── */
#addCoreDocModal .mv-modal-card { width: 460px; padding: 22px 24px 18px; border-radius: 16px; background: #FDF8EF; color: #0C1520; }
#addCoreDocModal .mv-modal-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; color: #0C1520; }
#addCoreDocModal .mv-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
    padding: 1.4rem 1rem;
    border: 2px dashed rgba(36, 59, 94, 0.3);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
#addCoreDocModal .mv-drop:hover,
#addCoreDocModal .mv-drop:focus-visible,
#addCoreDocModal .mv-drop.mv-drop-over { border-color: #EFD06A; background: #FBF3C6; outline: none; }
/* display:flex vince sull'attributo hidden: senza questa regola la dropzone
   non spariva mai a file scelto (bug segnalato 2 volte da Matteo) */
#addCoreDocModal .mv-drop[hidden],
#addCoreDocModal .mv-docview-card[hidden],
#addCoreDocModal .mv-docview-img[hidden],
#addCoreDocModal .mv-choice[hidden] { display: none; }
#addCoreDocModal .mv-drop-strong { color: #003E54; font-weight: 700; font-size: 0.95rem; }
#addCoreDocModal .mv-drop-sub { color: rgba(36, 59, 94, 0.6); font-size: 0.78rem; }
/* chip file (stessa lingua del Tool 1): riga sand, badge oro del tipo */
#addCoreDocModal .mv-file-preview {
    background: #fff;
    border: 1px solid #EFD06A;
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
    box-shadow: 0 1px 2px rgba(12, 21, 32, 0.05);
}
#addCoreDocModal .mv-file-icon,
#addCoreDocModal .mv-file-icon.pdf,
#addCoreDocModal .mv-file-icon.jpg,
#addCoreDocModal .mv-file-icon.doc,
#addCoreDocModal .mv-file-icon.other {
    width: auto;
    height: auto;
    background: #EFD06A;
    color: #243B5E;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.3em 0.6em;
    border-radius: 6px;
}
#addCoreDocModal .mv-file-name { color: #243B5E; font-size: 0.82rem; }
/* scelte a due opzioni (ratifica 4 ago sera: niente tick) — selezione butter/oro */
#addCoreDocModal .mv-choice { display: flex; gap: 8px; }
#addCoreDocModal .mv-choice-opt {
    flex: 1 1 0;
    border: 1.5px solid rgba(36, 59, 94, 0.2);
    background: #fff;
    color: #243B5E;
    border-radius: 10px;
    padding: 0.62rem 0.7rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}
#addCoreDocModal .mv-choice-opt:hover { background: #FDF8EF; }
#addCoreDocModal .mv-choice-opt.is-sel { background: #FBF3C6; border-color: #EFD06A; color: #0C1520; }
#addCoreDocModal .mv-choice-hint { display: block; margin-top: 6px; font-size: 0.72rem; color: rgba(36, 59, 94, 0.6); }
#addCoreDocModal .mv-read-note { font-size: 0.75rem; color: rgba(36, 59, 94, 0.65); margin: 2px 0 10px; line-height: 1.45; }
/* vista documento: la preview prende il posto della dropzone quando il file c'è */
#addCoreDocModal .mv-docview { border: 1px solid #EFD06A; border-radius: 12px; background: #fff; overflow: hidden; }
#addCoreDocModal .mv-docview-img { display: block; width: 100%; max-height: 240px; object-fit: contain; background: #fff; }
#addCoreDocModal .mv-docview-card { display: flex; align-items: center; gap: 10px; padding: 14px; }
#addCoreDocModal .mv-docview-ext { flex: none; background: #EFD06A; color: #243B5E; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; padding: 0.3em 0.6em; border-radius: 6px; }
#addCoreDocModal .mv-docview-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; font-weight: 600; color: #243B5E; }
#addCoreDocModal .mv-docview-size { flex: none; font-size: 0.72rem; color: rgba(36, 59, 94, 0.55); }
#addCoreDocModal .mv-docview-change {
    display: block; width: 100%;
    border: 0; border-top: 1px solid rgba(36, 59, 94, 0.12);
    background: #FDF8EF; color: #003E54;
    font: inherit; font-size: 0.8rem; font-weight: 700;
    padding: 0.55rem; cursor: pointer;
}
#addCoreDocModal .mv-docview-change:hover { background: #FBF3C6; }
/* scan visivo (4 ago notte): al Salva con compila attivo la barra parte QUI,
   sulla preview — il modal di lettura poi continua la stessa scena */
#addCoreDocModal .mv-docview { position: relative; }
#addCoreDocModal .mv-docview.mv-scanning::after {
    content: "";
    position: absolute;
    left: -2%;
    width: 104%;
    height: 34%;
    top: -40%;
    background: linear-gradient(180deg,
        rgba(239, 208, 106, 0) 0%,
        rgba(239, 208, 106, 0.26) 44%,
        rgba(239, 208, 106, 0.6) 50%,
        rgba(239, 208, 106, 0.26) 56%,
        rgba(239, 208, 106, 0) 100%);
    animation: mvScan 1.7s ease-in-out infinite;
    pointer-events: none;
}
@keyframes mvScan { 0% { top: -40%; } 55% { top: 105%; } 100% { top: 105%; } }
@media (prefers-reduced-motion: reduce) { #addCoreDocModal .mv-docview.mv-scanning::after { animation: none; display: none; } }
#addCoreDocModal .mv-docview.mv-scanning .mv-docview-change { pointer-events: none; opacity: 0.5; }
/* UNA vista sola durante lo scan: resta solo la preview col fascio, via tutto il resto */
#addCoreDocModal.mv-scanmode .mv-label,
#addCoreDocModal.mv-scanmode .mv-field-hint,
#addCoreDocModal.mv-scanmode #docReadFieldWrapper,
#addCoreDocModal.mv-scanmode #docShareFieldWrapper,
#addCoreDocModal.mv-scanmode #docMetadata,
#addCoreDocModal.mv-scanmode .mv-read-note,
#addCoreDocModal.mv-scanmode .mv-modal-actions,
#addCoreDocModal.mv-scanmode .mv-docview-change,
#addCoreDocModal.mv-scanmode .mv-modal-close { display: none; }
/* scena ima innestata: la card mostra SOLO lei (scan/recap/bivi vivono qui) */
#addCoreDocModal.mv-imahost .mv-modal-head,
#addCoreDocModal.mv-imahost .mv-modal-body,
#addCoreDocModal.mv-imahost .mv-read-note,
#addCoreDocModal.mv-imahost .mv-modal-actions { display: none; }
#addCoreDocModal .mv-cat-pill { border-radius: 10px; }
#addCoreDocModal .mv-modal-close { width: 2rem; height: 2rem; border-radius: 50%; background: rgba(0,62,84,0.06); }
#addCoreDocModal .mv-modal-close:hover { background: rgba(0,62,84,0.12); }
#addCoreDocModal .mv-label { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; font-size: 0.72rem; color: rgba(36,59,94,0.65); margin-bottom: 6px; }
#addCoreDocModal .mv-field input[type="text"],
#addCoreDocModal .mv-field select,
#addCoreDocModal .mv-field input[type="date"] { font-size: 0.95rem; padding: 0.7rem 0.85rem; border-radius: 12px; border: 1.5px solid rgba(36,59,94,0.2); background: #fff; color: #0C1520; }
#addCoreDocModal .mv-modal-actions { gap: 10px; margin-top: 4px; }
#addCoreDocModal .mv-btn-ghost,
#addCoreDocModal .mv-btn-primary { border-radius: 10px; padding: 0.62rem 1.5rem; font-weight: 700; font-size: 0.92rem; }
#addCoreDocModal .mv-btn-ghost { background: #fff; border: 1.5px solid rgba(36,59,94,0.2); color: #243B5E; }
#addCoreDocModal .mv-btn-primary { background: #003E54; color: #fff; border: none; }
#addCoreDocModal .mv-btn-primary:hover:not(:disabled) { filter: brightness(1.15); }
#addCoreDocModal .mv-btn-primary:disabled { background: rgba(36,59,94,0.14); color: rgba(36,59,94,0.45); }
/* category pills (replaces the select) */
#addCoreDocModal .mv-cat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
#addCoreDocModal .mv-cat-pill { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid rgba(0,62,84,0.14); background: #fff; color: #003E54; border-radius: 999px; padding: 0.5rem 0.95rem; font-weight: 700; font-size: 0.85rem; cursor: pointer; font-family: inherit; }
#addCoreDocModal .mv-cat-pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--p, #003E54); flex: 0 0 auto; }
#addCoreDocModal .mv-cat-pill:hover { border-color: rgba(0,62,84,0.3); }
#addCoreDocModal .mv-cat-pill.is-sel { border-color: var(--p, #003E54); box-shadow: 0 0 0 2px color-mix(in srgb, var(--p, #003E54) 30%, transparent); }
