/* ============================================================================
   טופס ההוספה כשהחשבונית בראשו (החלטת בעלים, 11.10.2026): אזור ההעלאה,
   כרטיס הקובץ והקריאה, התגים שליד השדות וההצעות שמתחתיהם, ואזהרת הכפילות.

   **קובץ נפרד מ-expense-modal.css**, שכבר עבר את תקרת 300 השורות. הערכים
   מהחבילה שבעל המוצר מסר, שנבנתה מהפלטה הקיימת של אותו קובץ ושל base.css.

   **כל אנימציה כאן נעצרת ב-prefers-reduced-motion**, בסוף הקובץ.

   לא שייך לכאן: מעטפת החלון ושורות המסמכים (expense-modal.css).
   ============================================================================ */

#addExpenseModal.exp-modal .modal-content {
    max-width: 660px;
    width: min(660px, 94vw);
    max-height: min(96vh, 1000px);
}

.exp-inv-zone {
    margin-bottom: 11px;
}

/* ── אזור הגרירה ── */
.exp-inv-drop {
    position: relative;
    padding: 2px;
    border-radius: 14px;
    background: linear-gradient(120deg, #4a6fa5, #8fb0dd, #cfdcef, #8fb0dd, #4a6fa5);
    background-size: 300% 100%;
    /* WCAG 2.2.2: תנועה שמתחילה לבד נעצרת לפני חמש שניות. המסגרת נעצרת
       על הנקודה שהגיעה אליה, וכל נקודה במעבר הצבע נראית כמו מסגרת. */
    animation: expInvBorderFlow 6s linear .75 both;
    box-shadow: 0 10px 28px -10px rgba(47, 79, 127, .35);
    transition: transform .2s, box-shadow .2s;
}

.exp-inv-drop:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px -10px rgba(47, 79, 127, .45);
}

.exp-inv-drop-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 12px;
    padding: 10px 14px;
    background: linear-gradient(100deg, #fff, #f1f5f9);
    border: 1.5px dashed rgba(74, 111, 165, .35);
    transition: all .2s;
}

.exp-inv-drop--over .exp-inv-drop-inner {
    border-color: #2f4f7f;
    background: #eef2f7;
    transform: scale(1.015);
}

/* מסמך חובה שחסר בשמירה. הסימון יושב על התיבה (`data-error-target`). */
.exp-inv-box.input-invalid .exp-inv-drop-inner {
    border-color: #f87171;
    background: #fef2f2;
}

.exp-inv-box.input-invalid .exp-inv-drop-title {
    color: #b91c1c;
}

.exp-inv-drop-text {
    flex: 1;
    min-width: 0;
}

.exp-inv-drop-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exp-inv-drop-sub {
    font-size: 12px;
    line-height: 1.45;
    color: #5a6779;
    margin-top: 2px;
}

.exp-inv-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, #3a5f94 0%, #2f4f7f 100%);
    border: none;
    border-radius: 9px;
    padding: 10px 15px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 6px 14px -4px rgba(47, 79, 127, .55), inset 0 1px 0 rgba(255, 255, 255, .2);
    transition: transform .15s;
}

.exp-inv-upload-btn:hover {
    transform: translateY(-1px);
}

.exp-inv-or {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.exp-inv-or > span {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.exp-inv-or-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 11.5px;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
}

.exp-inv-or-btn:hover {
    color: #2f4f7f;
}

/* במסך צר הכפתור יורד לשורה משלו במלוא הרוחב, ולא דוחס את הכותרת. */
@media (max-width: 520px) {
    .exp-inv-drop-inner {
        flex-wrap: wrap;
    }

    .exp-inv-upload-btn {
        flex: 1 1 100%;
        justify-content: center;
        min-height: 44px;
    }

    .exp-inv-drop-title {
        white-space: normal;
    }
}

/* ── שורות דקות: ממלאים ידנית, והתחייבות ── */
.exp-inv-slim {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 8px 12px;
    font-size: 12px;
    color: #475569;
    animation: expInvSlideIn .25s ease-out both;
}

.exp-inv-slim-text {
    flex: 1;
    min-width: 0;
    line-height: 1.5;
}

.exp-inv-slim--commit {
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
}

.exp-inv-slim--commit strong {
    color: #0f172a;
    font-weight: 600;
}

.exp-inv-slim-tile {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1.5px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

@keyframes expInvBorderFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes expInvSlideIn {
    0% { opacity: 0; transform: translateY(-6px); }
    100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .exp-inv-drop,
    .exp-inv-slim {
        animation: none;
    }

    .exp-inv-drop,
    .exp-inv-drop-inner,
    .exp-inv-upload-btn {
        transition: none;
    }

    .exp-inv-drop:hover,
    .exp-inv-upload-btn:hover,
    .exp-inv-drop--over .exp-inv-drop-inner {
        transform: none;
    }
}

/* "גררו" אינו מילה למסך מגע. שם הכותרת מבקשת להעלות. */
.exp-inv-title-touch {
    display: none;
}

@media (hover: none) and (pointer: coarse) {
    .exp-inv-title-drag {
        display: none;
    }

    .exp-inv-title-touch {
        display: inline;
    }
}

/* אזור ההכרזה לקורא המסך (`docInlineAnnounce`). לא נראה, אבל נקרא. */
.exp-sr-live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
