/* Inbox page extras (inbox.js): banner, labels, fraud alert, Hebrew summary, tasks, formatted view, mobile reading mode */
.inbox-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
}
.inbox-banner span {
    flex: 1;
}
.inbox-banner.error {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.inbox-banner.warn {
    background: rgba(245, 158, 11, 0.13);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.inbox-toolbar-2 {
    margin-top: -0.25rem;
}
.inbox-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.inbox-search-box {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}
.inbox-check {
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}
.inbox-check.block {
    display: flex;
    margin: 0.25rem 0;
}
.inbox-row.selected td {
    background: rgba(99, 102, 241, 0.08);
}
.inbox-chip.dev {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}
.inbox-chip.unit.suggested {
    border: 1px dashed #059669;
    background: transparent;
}
.inbox-label {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 4px;
    margin-left: 4px;
    border: 1px solid transparent;
    background: transparent;
    cursor: default;
}
.inbox-label.auto {
    border-style: dashed;
}
.l-payment {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.5);
}
.l-handover {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.5);
}
.l-kyc {
    color: #6d28d9;
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.5);
}
.l-legal {
    color: #be123c;
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.5);
}
.inbox-tab.l-payment.active,
.inbox-tab.l-handover.active,
.inbox-tab.l-kyc.active,
.inbox-tab.l-legal.active {
    color: #fff;
}
.inbox-tab.l-payment.active {
    background: #d97706;
}
.inbox-tab.l-handover.active {
    background: #059669;
}
.inbox-tab.l-kyc.active {
    background: #7c3aed;
}
.inbox-tab.l-legal.active {
    background: #e11d48;
}
.inbox-risk.high {
    color: #dc2626;
}
.inbox-risk.medium {
    color: #d97706;
}
.inbox-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #991b1b;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
}
.inbox-alert ul {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
}
.inbox-alert li.medium {
    color: #92400e;
}
.inbox-summary {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    text-align: right;
}
.inbox-unitbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    font-size: 0.86rem;
}
.inbox-labelbar {
    margin-left: auto;
    display: inline-flex;
    gap: 0.25rem;
}
.inbox-labelbar .inbox-label {
    cursor: pointer;
    opacity: 0.45;
    margin: 0;
}
.inbox-labelbar .inbox-label.on {
    opacity: 1;
}
.inbox-labelbar .inbox-label.auto {
    opacity: 0.8;
}
.inbox-viewtoggle {
    margin-bottom: 0.4rem;
}
.inbox-frame {
    width: 100%;
    height: 50vh;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 10px;
    background: #fff;
}
.inbox-att-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}
.inbox-opentasks {
    margin-top: 0.6rem;
    font-size: 0.86rem;
}
.inbox-taskbox {
    margin-top: 0.75rem;
    font-size: 0.88rem;
}
.inbox-taskbox summary {
    cursor: pointer;
    font-weight: 600;
}
.inbox-taskrow {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.inbox-taskrow input[type='date'] {
    max-width: 11rem;
}
.inbox-taskrow input:first-child {
    flex: 1;
    min-width: 12rem;
}
.inbox-replytools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.4rem;
}
.inbox-replytools select {
    max-width: 14rem;
}

/* reading a mail on a phone: full screen, actions pinned at the bottom */
@media (max-width: 640px) {
    #inbox-modal.active {
        padding: 0;
        align-items: stretch;
    }
    #inbox-modal .inbox-modal-box {
        width: 100vw;
        max-width: 100vw !important;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        margin: 0;
    }
    #inbox-modal .modal-body {
        flex: 1;
        max-height: none;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #inbox-modal .modal-footer {
        position: sticky;
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
        gap: 0.4rem;
        padding: 0.6rem calc(0.75rem + env(safe-area-inset-right)) calc(0.6rem + env(safe-area-inset-bottom)) 0.75rem;
        background: var(--bg-card, #fff);
        border-top: 1px solid var(--border-light, #e2e8f0);
        z-index: 2;
    }
    #inbox-modal .modal-footer .btn {
        min-height: 44px;
        justify-content: center;
        gap: 0.4rem;
        white-space: normal;
        line-height: 1.2;
        padding: 0.4rem 0.5rem;
    }
    .inbox-labelbar {
        margin-left: 0;
    }
    .inbox-frame {
        height: 55vh;
    }
    .inbox-search-box {
        width: 100%;
    }
    .inbox-search-box .form-input {
        max-width: none;
        flex: 1;
    }
    .inbox-tabs {
        flex-wrap: wrap;
    }
}
