/* Credit Redemption catalog, search, command copy, examples, and responsive layout styles. */

.redemption-grid.live-redemptions {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(126, 223, 255, 0.26);
    border-radius: 18px;
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 138, 61, 0.09), transparent 30%),
        radial-gradient(circle at 86% 6%, rgba(126, 223, 255, 0.07), transparent 34%),
        linear-gradient(135deg, rgba(8, 24, 45, 0.76), rgba(5, 15, 31, 0.78) 38%, rgba(5, 15, 31, 0.90));
    box-shadow:
        inset 0 0 0 1px rgba(126, 223, 255, 0.04),
        inset 0 1px 0 rgba(234, 247, 255, 0.04),
        0 0 26px rgba(45, 184, 255, 0.055);
}

.redemption-panel-control-row {
    display: grid;
    grid-template-columns: minmax(220px, 360px) auto;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 4px;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(126, 223, 255, 0.08);
}

.redemption-search-wrap {
    position: relative;
    display: grid;
    min-width: 0;
}

.redemption-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.redemption-search-input {
    width: 100%;
    min-height: 34px;
    border: 1px solid rgba(255, 138, 61, 0.26);
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(255, 138, 61, 0.045), transparent 62%),
        rgba(5, 15, 31, 0.82);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    outline: none;
    padding: 8px 34px 8px 13px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.redemption-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.redemption-search-input::placeholder {
    color: rgba(234, 247, 255, 0.48);
}

.redemption-search-input:focus {
    border-color: rgba(255, 138, 61, 0.70);
    background:
        linear-gradient(90deg, rgba(255, 138, 61, 0.080), transparent 62%),
        rgba(8, 24, 45, 0.94);
    box-shadow: 0 0 18px rgba(255, 138, 61, 0.14), inset 0 0 14px rgba(126, 223, 255, 0.03);
}

.redemption-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: none;
}

.redemption-search-wrap.has-query .redemption-search-clear {
    display: inline-grid;
    place-items: center;
}

.redemption-search-clear:hover {
    color: #ffb16a;
    background: rgba(255, 138, 61, 0.10);
}

.redemption-panel-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.redemption-panel-buttons .mini-button {
    min-width: 94px;
    padding: 6px 10px;
    font-size: 11px;
    color: var(--muted);
}

.redemption-panel-buttons .mini-button:hover {
    color: var(--text);
    border-color: rgba(255, 138, 61, 0.58);
}

.redemption-category-group {
    border: 1px solid rgba(255, 138, 61, 0.26);
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(255, 138, 61, 0.055), transparent 34%),
        linear-gradient(135deg, rgba(9, 27, 48, 0.80), rgba(5, 15, 31, 0.70));
    box-shadow:
        inset 3px 0 0 rgba(255, 138, 61, 0.18),
        inset 0 1px 0 rgba(234, 247, 255, 0.04),
        0 0 16px rgba(255, 138, 61, 0.035);
    overflow: hidden;
}

.redemption-category-group[open] {
    border-color: rgba(255, 138, 61, 0.52);
    background:
        linear-gradient(90deg, rgba(255, 138, 61, 0.075), transparent 34%),
        linear-gradient(135deg, rgba(10, 31, 54, 0.86), rgba(5, 15, 31, 0.76));
    box-shadow:
        inset 4px 0 0 rgba(255, 138, 61, 0.48),
        0 0 22px rgba(255, 138, 61, 0.11),
        inset 0 1px 0 rgba(234, 247, 255, 0.055);
}

.redemption-category-group > summary {
    cursor: pointer;
    list-style: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 30px;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    min-height: 62px;
    color: var(--text);
    font-weight: 900;
    position: relative;
    overflow: hidden;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.redemption-category-group > summary::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 60px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 138, 61, 0.72), rgba(126, 223, 255, 0.24), transparent);
    opacity: 0.58;
    pointer-events: none;
}

.redemption-category-group > summary::-webkit-details-marker {
    display: none;
}

.redemption-category-group > summary::after {
    content: "+";
    color: #ffb16a;
    font-size: 19px;
    font-weight: 950;
    line-height: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 138, 61, 0.36);
    border-radius: 999px;
    background: rgba(255, 138, 61, 0.075);
    box-shadow: inset 0 0 10px rgba(255, 138, 61, 0.05), 0 0 12px rgba(255, 138, 61, 0.08);
    margin-left: 0;
}

.redemption-category-group[open] > summary::after {
    content: "–";
}

.redemption-category-group:not([open]) > summary:hover {
    background:
        linear-gradient(90deg, rgba(255, 138, 61, 0.12), transparent 54%),
        rgba(126, 223, 255, 0.028);
    box-shadow: inset 0 0 0 1px rgba(255, 138, 61, 0.14);
}

.redemption-category-title {
    color: rgba(255, 240, 222, 0.96);
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    font-weight: 950;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 138, 61, 0.15);
}

.redemption-category-group[open] .redemption-category-title {
    color: #ffb16a;
}

.redemption-category-count {
    color: rgba(199, 218, 236, 0.74);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
    letter-spacing: .01em;
    position: relative;
    z-index: 2;
}

.redemption-live-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    padding: 0 14px 14px;
}

.redemption-card.live-catalog-card {
    position: relative;
    min-height: 146px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 14px;
    border-color: rgba(255, 138, 61, 0.30);
    background:
        radial-gradient(circle at 9% 8%, rgba(255, 138, 61, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(234, 247, 255, 0.032), transparent 42%),
        linear-gradient(135deg, rgba(255, 138, 61, 0.078), rgba(10, 31, 54, 0.72) 52%, rgba(5, 15, 31, 0.68));
    box-shadow:
        inset 4px 0 0 rgba(255, 138, 61, 0.34),
        inset 0 1px 0 rgba(234, 247, 255, 0.055),
        0 0 16px rgba(255, 138, 61, 0.045);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.redemption-card.live-catalog-card::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 138, 61, 0.68), rgba(126, 223, 255, 0.22), transparent);
    opacity: 0.54;
    pointer-events: none;
}

.redemption-card.live-catalog-card:hover,
.redemption-card.live-catalog-card:focus-within {
    border-color: rgba(255, 138, 61, 0.70);
    background:
        radial-gradient(circle at 9% 8%, rgba(255, 138, 61, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(234, 247, 255, 0.042), transparent 42%),
        linear-gradient(135deg, rgba(255, 138, 61, 0.13), rgba(18, 51, 84, 0.76) 52%, rgba(8, 24, 45, 0.74));
    box-shadow:
        inset 4px 0 0 rgba(255, 138, 61, 0.62),
        0 0 22px rgba(255, 138, 61, 0.17),
        inset 0 1px 0 rgba(234, 247, 255, 0.07);
    transform: translateY(-1px);
}

.redemption-card.live-catalog-card.is-coming-soon {
    opacity: 0.50;
    filter: grayscale(0.62) saturate(0.55);
    border-color: rgba(160, 178, 196, 0.20);
    background:
        linear-gradient(180deg, rgba(234, 247, 255, 0.018), transparent 42%),
        linear-gradient(135deg, rgba(120, 130, 145, 0.040), rgba(5, 15, 31, 0.66));
    box-shadow: inset 3px 0 0 rgba(180, 190, 210, 0.13), inset 0 1px 0 rgba(234, 247, 255, 0.025);
}

.redemption-card.live-catalog-card.is-coming-soon:hover,
.redemption-card.live-catalog-card.is-coming-soon:focus-within {
    opacity: 0.60;
    filter: grayscale(0.48) saturate(0.70);
    transform: none;
    border-color: rgba(255, 211, 126, 0.24);
    box-shadow: inset 3px 0 0 rgba(255, 211, 126, 0.18), inset 0 1px 0 rgba(234, 247, 255, 0.025);
}

.redemption-card.live-catalog-card.redemption-card-jump-highlight {
    border-color: rgba(255, 138, 61, 0.84);
    background:
        linear-gradient(135deg, rgba(255, 138, 61, 0.20), rgba(8, 24, 45, 0.72)),
        rgba(8, 24, 45, 0.72);
    box-shadow: inset 4px 0 0 rgba(255, 138, 61, 0.66), 0 0 26px rgba(255, 138, 61, 0.24);
    animation: redemptionCardJumpHighlight 2400ms ease-out;
}

@keyframes redemptionCardJumpHighlight {
    0% {
        filter: brightness(1.22);
        transform: translateY(-1px);
    }

    55% {
        filter: brightness(1.10);
    }

    100% {
        filter: brightness(1);
        transform: translateY(0);
    }
}

.redemption-card-header {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.redemption-card-header .redemption-icon {
    margin: 0;
    border-color: rgba(255, 138, 61, 0.42);
    color: #ff9a5a;
    background:
        radial-gradient(circle at 45% 35%, rgba(255, 138, 61, 0.24), transparent 66%),
        rgba(255, 138, 61, 0.09);
    box-shadow: 0 0 14px rgba(255, 138, 61, 0.14), inset 0 0 12px rgba(255, 138, 61, 0.045);
}

.redemption-card.live-catalog-card.is-coming-soon .redemption-icon {
    border-color: rgba(180, 190, 210, 0.24);
    color: rgba(199, 218, 236, 0.54);
    background: rgba(160, 178, 196, 0.06);
    box-shadow: inset 0 0 10px rgba(160, 178, 196, 0.035);
}

.redemption-card-header h3 {
    margin: 0;
    min-width: 0;
    color: rgba(255, 242, 226, 0.98);
    text-shadow: 0 0 10px rgba(255, 138, 61, 0.14);
}

.redemption-card.live-catalog-card.is-coming-soon h3 {
    color: rgba(199, 218, 236, 0.64);
    text-shadow: none;
}

.redemption-card.live-catalog-card p {
    margin: 0;
    min-height: 34px;
}

.redemption-card.live-catalog-card.is-coming-soon p {
    color: rgba(199, 218, 236, 0.56);
}

.redemption-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.redemption-cost {
    margin: 0;
    color: #ff8a3d;
    text-shadow: 0 0 10px rgba(255, 138, 61, 0.24);
    line-height: 1.05;
}

.redemption-card.live-catalog-card.is-coming-soon .redemption-cost {
    color: rgba(255, 211, 126, 0.62);
    text-shadow: none;
}

.redemption-status-pill {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border: 1px solid rgba(126, 223, 255, 0.22);
    border-radius: 999px;
    background: rgba(126, 223, 255, 0.07);
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 6px;
    margin: 0;
    justify-self: end;
    white-space: nowrap;
}

.redemption-status-pill.active {
    color: var(--success);
    border-color: rgba(129, 255, 195, 0.42);
    background: rgba(129, 255, 195, 0.09);
    box-shadow: 0 0 10px rgba(129, 255, 195, 0.10);
}

.redemption-status-pill.coming-soon {
    color: rgba(255, 211, 126, 0.78);
    border-color: rgba(255, 211, 126, 0.26);
    background: rgba(255, 211, 126, 0.055);
}

/* Right-side pill cluster so a "Live Show Only" pill can sit next to the status pill. */
.redemption-pill-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
}

/* "Live Show Only" pill -- matches the red live-only pill on the Credits + Charge (alert values) page. */
.redemption-live-only-pill {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border: 1px solid rgba(255, 120, 120, 0.34);
    border-radius: 999px;
    background: rgba(255, 80, 80, 0.075);
    color: #ff9a9a;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 6px;
    margin: 0;
    white-space: nowrap;
}

.redemption-command-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0;
}

.redemption-command-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(126, 223, 255, 0.24);
    border-radius: 999px;
    background: rgba(126, 223, 255, 0.075);
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
    padding: 5px 7px;
    line-height: 1;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    text-transform: none;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.redemption-card.live-catalog-card.is-coming-soon .redemption-command-pill {
    color: rgba(126, 223, 255, 0.58);
    border-color: rgba(126, 223, 255, 0.12);
    background: rgba(126, 223, 255, 0.035);
}

.redemption-command-pill:hover,
.redemption-command-pill:focus-visible {
    color: var(--text);
    border-color: rgba(126, 223, 255, 0.68);
    background: rgba(126, 223, 255, 0.13);
    box-shadow: 0 0 16px rgba(45, 184, 255, 0.20);
    transform: translateY(-1px);
    outline: none;
}

.redemption-command-pill.copied {
    color: var(--success);
    border-color: rgba(129, 255, 195, 0.50);
    background: rgba(129, 255, 195, 0.10);
    box-shadow: 0 0 16px rgba(129, 255, 195, 0.16);
}

.redemption-command-note {
    margin-top: 0;
    color: rgba(234, 247, 255, 0.68);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 700;
}

.redemption-examples {
    margin-top: 2px;
    border: 1px solid rgba(126, 223, 255, 0.16);
    border-radius: 10px;
    background: rgba(126, 223, 255, 0.045);
    overflow: hidden;
}

.redemption-examples > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    color: var(--accent);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    padding: 7px 8px;
    min-height: 0;
}

.redemption-examples > summary::-webkit-details-marker {
    display: none;
}

.redemption-examples > summary::after {
    content: "+";
    color: var(--muted);
    font-size: 13px;
}

.redemption-examples[open] > summary::after {
    content: "−";
}

.redemption-example-list {
    display: grid;
    gap: 6px;
    padding: 0 8px 8px;
}

.redemption-example-line {
    color: rgba(234, 247, 255, 0.74);
    font-size: 10px;
    line-height: 1.35;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    word-break: break-word;
    user-select: all;
}

#recent-redemptions-list .recent-item.redemption-activity-item {
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#recent-redemptions-list .recent-item.redemption-activity-item:hover,
#recent-redemptions-list .recent-item.redemption-activity-item:focus-visible {
    border-color: rgba(255, 138, 61, 0.62) !important;
    background: linear-gradient(135deg, rgba(255, 138, 61, 0.18), rgba(8, 24, 45, 0.72)) !important;
    box-shadow: inset 3px 0 0 rgba(255, 138, 61, 0.56), 0 0 18px rgba(255, 138, 61, 0.14) !important;
    transform: translateY(-1px);
    outline: none;
}

@media (max-width: 760px) {
    .redemptions-view-layout {
        gap: 10px;
    }

    .redemption-grid.live-redemptions {
        gap: 8px;
        padding: 10px;
        border-radius: 14px;
    }

    .redemption-panel-control-row {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 8px;
        padding-bottom: 8px;
    }

    .redemption-search-input {
        min-height: 31px;
        padding: 7px 32px 7px 11px;
        font-size: 11px;
    }

    .redemption-panel-buttons {
        justify-content: flex-start;
        gap: 6px;
    }

    .redemption-panel-buttons .mini-button {
        min-width: 78px;
        min-height: 30px;
        padding: 5px 8px;
        font-size: 9.5px;
    }

    .redemption-category-group {
        border-radius: 13px;
    }

    .redemption-category-group > summary {
        grid-template-columns: minmax(0, 1fr) auto 24px;
        gap: 8px;
        min-height: 48px;
        padding: 10px 12px;
    }

    .redemption-category-group > summary::before {
        left: 14px;
        right: 48px;
    }

    .redemption-category-group > summary::after {
        width: 20px;
        height: 20px;
        font-size: 16px;
    }

    .redemption-category-title {
        font-size: 12.5px;
        line-height: 1.1;
    }

    .redemption-category-count {
        font-size: 10px;
    }

    .redemption-live-card-grid {
        gap: 7px;
        padding: 0 9px 9px;
    }

    .redemption-card.live-catalog-card {
        min-height: 0;
        gap: 6px;
        padding: 9px;
        border-radius: 10px;
    }

    .redemption-card.live-catalog-card::before {
        left: 10px;
        right: 10px;
    }

    .redemption-card-header {
        grid-template-columns: 24px minmax(0, 1fr);
        gap: 8px;
        padding-right: min(39vw, 130px);
    }

    .redemption-card-header .redemption-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 12px;
    }

    .redemption-card-header h3 {
        font-size: 12.5px;
        line-height: 1.1;
    }

    .redemption-card.live-catalog-card p {
        min-height: 0;
        font-size: 11px;
        line-height: 1.25;
    }

    .redemption-card-meta {
        gap: 5px;
        align-items: flex-start;
    }

    .redemption-cost {
        font-size: 12px;
    }

    .redemption-status-pill {
        padding: 3px 5px;
        font-size: 8.5px;
        letter-spacing: 0.03em;
    }

    .redemption-command-row {
        position: absolute;
        top: 15px;
        right: 10px;
        z-index: 3;
        max-width: min(38vw, 128px);
        justify-content: flex-end;
        gap: 4px;
        margin-top: 0;
    }

    .redemption-command-pill {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 3px 5px;
        font-size: 8.5px;
    }

    .redemption-command-note {
        font-size: 10px;
        line-height: 1.25;
    }

    .redemption-examples {
        border-radius: 8px;
    }

    .redemption-examples > summary {
        padding: 6px 7px;
        font-size: 8.5px;
        letter-spacing: 0.04em;
    }

    .redemption-example-list {
        gap: 4px;
        padding: 0 7px 7px;
    }

    .redemption-example-line {
        font-size: 9px;
        line-height: 1.25;
    }

    #recent-redemptions-list .recent-item {
        min-height: 54px;
        padding: 9px 10px !important;
    }
}

@media (max-width: 620px) {
    .redemption-live-card-grid {
        grid-template-columns: 1fr;
    }

    .redemption-category-group > summary {
        grid-template-columns: minmax(0, 1fr) 24px;
    }

    .redemption-category-count {
        display: none;
    }
}
