/* Limited Seller Access pill + application modal, and the "Track this purchase" link.
   Loaded after market.css, which owns the base pill / modal / button styles. */

/* ---- access pill ---- */
.limiteds-trust-pill .seller-access-btn {
    margin-left: 2px;
    padding: 3px 10px;
    border: 0;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    transition: filter 0.15s;
}

.limiteds-trust-pill .seller-access-btn:hover:not(:disabled) { filter: brightness(1.15); }
.limiteds-trust-pill .seller-access-btn:disabled { cursor: default; }

.limiteds-trust-pill.is-access-pending { border-color: rgba(245, 166, 35, 0.35); }
.limiteds-trust-pill.is-seller-access.is-access-pending i { color: var(--orange); }
.limiteds-trust-pill.is-access-pending .seller-access-btn {
    color: var(--orange);
    background: rgba(245, 166, 35, 0.14);
}

.limiteds-trust-pill.is-seller-access.is-access-approved {
    border-color: rgba(31, 191, 107, 0.35);
    color: var(--green);
    background-color: rgba(31, 191, 107, 0.08);
}
.limiteds-trust-pill.is-seller-access.is-access-approved i { color: var(--green); }
.limiteds-trust-pill.is-access-approved .seller-access-btn {
    color: var(--green);
    background: rgba(31, 191, 107, 0.16);
}

.limiteds-trust-pill.is-seller-access.is-access-rejected i { color: #ff7b7b; }
.limiteds-trust-pill.is-access-rejected .seller-access-btn {
    color: #ff7b7b;
    background: rgba(239, 68, 68, 0.14);
}

/* ---- application modal ---- */
.sa-modal .sa-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
    color: var(--text);
}

.sa-modal .sa-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.sa-modal .sa-count {
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
    text-align: right;
}

.sa-modal .sa-prev-note {
    margin-bottom: 14px;
    overflow-wrap: anywhere;
}

.sa-modal .sa-error .settings-notice {
    margin: 10px 0 0;
    overflow-wrap: anywhere;
}

.sa-modal .sa-error a { text-decoration: underline; }

/* ---- coin picker in the buy window (the tiles themselves come from pay-picker.css) ---- */
.buy-modal #buy-currency-picker .pp-grid { gap: 8px; }
.buy-modal #buy-currency-picker .settings-notice { margin-bottom: 0; }

@media (max-width: 480px) {
    /* Tighter on phones so the window doesn't need much scrolling */
    .buy-modal #buy-currency-picker .pp-tile { padding: 10px 11px; }
    .buy-modal #buy-currency-picker .pp-est { margin-top: 7px; padding-top: 6px; }
    .buy-modal #buy-currency-picker .pp-foot { margin-top: 10px; }
}

/* ---- track link in the buy modal ---- */
.buy-track-link {
    display: block;
    margin: 12px 0 4px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.buy-track-link:hover { text-decoration: underline; }
.buy-track-link i { margin-right: 4px; }

/* ---- SALE (Admin > Sale): glowing discounted items, old price struck through ---- */

.limiteds-sale-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 176, 32, 0.5);
    border-radius: 14px;
    background: linear-gradient(100deg, rgba(255, 176, 32, 0.18), rgba(255, 84, 112, 0.13) 60%, rgba(255, 84, 112, 0.04));
    box-shadow: 0 0 30px rgba(255, 176, 32, 0.14);
}

.limiteds-sale-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.09) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: limitedSaleShine 4.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes limitedSaleShine {
    0% { transform: translateX(-100%); }
    55%, 100% { transform: translateX(100%); }
}

.limiteds-sale-flame {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 19px;
    color: #2a1500;
    background: linear-gradient(135deg, #ffb020, #ff6a4d);
    box-shadow: 0 4px 14px rgba(255, 140, 30, 0.45);
}

.limiteds-sale-text strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #ffd27a;
}

.limiteds-sale-text span { font-size: 12.5px; color: var(--text-dim); }

.limiteds-sale-clock {
    position: relative;
    z-index: 1;
    margin-left: auto;
    flex-shrink: 0;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    color: #ffd27a;
    background: rgba(12, 17, 21, 0.55);
    border: 1px solid rgba(255, 176, 32, 0.4);
}

.limited-card.is-sale,
.limited-featured-item.is-sale {
    border-color: rgba(255, 176, 32, 0.75);
    background: linear-gradient(180deg, rgba(255, 176, 32, 0.1), var(--bg-1) 55%);
    box-shadow: 0 0 0 1px rgba(255, 176, 32, 0.3), 0 0 22px rgba(255, 176, 32, 0.3);
    animation: limitedSaleGlow 2.6s ease-in-out infinite;
}

.limited-card.is-sale:hover,
.limited-featured-item.is-sale:hover { border-color: #ffc65a; }

@keyframes limitedSaleGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(255, 176, 32, 0.28), 0 0 16px rgba(255, 176, 32, 0.22); }
    50% { box-shadow: 0 0 0 1px rgba(255, 176, 32, 0.55), 0 0 32px rgba(255, 176, 32, 0.45); }
}

.limited-card.is-sale .limited-thumb,
.limited-featured-item.is-sale .limited-featured-thumb {
    background: radial-gradient(circle at 50% 38%, rgba(255, 176, 32, 0.3), transparent 72%), var(--bg-2);
}

.limited-sale-ribbon {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #2a1500;
    background: linear-gradient(90deg, #ffb020, #ff8a3d);
    box-shadow: 0 2px 10px rgba(255, 140, 30, 0.5);
}

/* The small "Trending" tiles only have room for the discount itself. */
.limited-featured-thumb .limited-sale-ribbon { font-size: 8.5px; padding: 2px 6px; }
.limited-featured-thumb .limited-sale-ribbon .lt { display: none; }

.limited-price-old {
    display: block;
    margin-bottom: 1px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(255, 84, 112, 0.95);
}

.limited-price.is-sale,
.limited-foot-value.is-price.is-sale {
    color: #ffd27a;
    text-shadow: 0 0 14px rgba(255, 176, 32, 0.5);
}

.limited-sale-ends {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 176, 32, 0.35);
    font-size: 11px;
    font-weight: 700;
    color: #ffc65a;
}

.limited-featured-item .limited-sale-ends { font-size: 10px; margin-top: 8px; }

/* Buy window */
.buy-item-old-price {
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(255, 84, 112, 0.95);
}

.buy-item-sale-tag {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-align: right;
    text-transform: uppercase;
    color: #ffc65a;
}

@media (max-width: 640px) {
    .limiteds-sale-banner { flex-wrap: wrap; }
    .limiteds-sale-clock { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .limited-card.is-sale,
    .limited-featured-item.is-sale { animation: none; }
    .limiteds-sale-banner::after { display: none; }
}

/* In the wide grid cards the ribbon sits bottom-left so it never touches the escrow shield (top-right). */
.limited-thumb .limited-sale-ribbon { top: auto; bottom: 6px; }
