
/* Shared escrow components, extracted from per-view files (Phase 4 dedup).
   Loaded on: my_buys, my_sales, account_info, useraccount, listings,
   details, alerts, favourites, listing_unavailable, listings_1234,
   my_listings, user_listings.
   NOT loaded on order_details (its .status-badge differs — avoids cascade leak).
   Class names below are unique to the views that load this file, so there is
   no cross-view leakage. View-specific variants stay in the view files. */

/* --- Escrow badges --- */
/* NOTE: these are distinct from .status-badge (order status pills) and from
   .badge-eid/.badge-eid.highlight in account_info.css (e-ID verification, green).
   These .escrow-badge-* classes are for the purple "Ostukaitse" escrow
   protection markers.

   Base = solid purple pill (most common use).
   Utility classes:
   --flat   : no bg, no pill, transparent (e.g. details page overlay)
   --light  : light purple bg (overrides base colour)
   --large  : larger text + larger icon
   --overlay: absolute position top-left over an image */

.escrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 10px;
    margin: 2px;    /* safe margin to avoid touching other elements */
    background-color: #7c3aed;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
}

.escrow-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* No bg, no pill — transparent. */
.escrow-badge--flat {
    background: transparent;
    color: #7c3aed;
    padding: 0;
    border-radius: 0;
}

/* Light purple bg — overrides base colour. */
.escrow-badge--light {
    background-color: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
    padding-top: 4px;
    padding-bottom: 4px;
}

/* Larger text + icon. */
.escrow-badge--large {
    font-size: 16px;
    padding: 8px 14px;
    border-radius: 16px;
}

.escrow-badge--large svg {
    width: 16px;
    height: 16px;
}

/* Absolute position top-left over an image. */
.escrow-badge--overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    pointer-events: none;
    z-index: 3;
}

/* Badge positioned on listing card image (main page) */
.item-v2 .escrow-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
}


/* --- Order status badges + row arrow (my_buys / my_sales) --- */
    .status-badge {
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }
    .status-delivered, .status-paid {
        background-color: #dff0d8;
        color: #3c763d;
    }
    .status-cancelled {
        background-color: #f2dede;
        color: #a94442;
    }
    .status-pending {
        background-color: #fcf8e3;
        color: #8a6d3b;
    }
    .status-funded,
    .status-label-generated,
    .status-shipped,
    .status-delivered-to-locker,
    .status-picked-up {
        background-color: #dff0d8;
        color: #3c763d;
    }
    .status-completed {
        background-color: #dff0d8;
        color: #3c763d;
    }
    .status-disputed,
    .status-refunded {
        background-color: #f2dede;
        color: #a94442;
    }
    .arrow-icon {
        color: #999;
        font-size: 18px;
    }
    .arrow-icon:hover,
    .arrow-icon:focus {
        color: #b73434;
    }

/* --- e-ID card (account_info / useraccount) --- */
    /* e-ID block */
    .eid-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #ffffff;
        border: 1px solid #ddd;
        border-radius: 3px;
        padding: 20px;
        margin-bottom: 15px;
        box-shadow: none;
        gap: 20px;
    }

    .eid-info {
        display: flex;
        align-items: flex-start;
        gap: 16px;
        flex: 1;
    }

    .eid-text-content {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .eid-title {
        font-weight: 500;
        font-size: 14px;
        color: #333;
    }

    .eid-description {
        font-size: 14px;
        color: #777;
        line-height: 1.4;
    }

    .eid-footer {
        font-size: 13px;
        color: #999;
    }

    .btn-eid {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        background: #ffffff;
        border: 1px solid #ddd;
        border-radius: 3px;
        color: #333;
        font-weight: normal;
        font-size: 13px;
        text-decoration: none !important;
        transition: all 0.25s linear 0s;
        white-space: nowrap;
        cursor: pointer;
    }

    .btn-eid:hover {
        background: #f5f5f5;
        border-color: #ccc;
        color: #333;
        box-shadow: none;
    }

    .btn-eid i:first-child {
        color: #b73434;
    }

    @media (max-width: 767px) {
        .btn-eid {
            justify-content: center;
            width: 100%;
        }
    }
