/*==================================================
    Fish Fish - Consumables and the Slot Machine
==================================================*/

[data-icon="potion"] { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 3h6M10 3v5L5.5 16.5A3 3 0 0 0 8.2 21h7.6a3 3 0 0 0 2.7-4.5L14 8V3'/><path d='M7.5 14h9'/></svg>"); }
[data-icon="slots"] { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='15' height='14' rx='2'/><path d='M8 5v14M13 5v14'/><path d='M18 9h1.5a1.5 1.5 0 0 1 1.5 1.5V12'/><circle cx='21' cy='4.5' r='1.5'/><path d='M21 6v6'/></svg>"); }


/*==================================================
    Consumables menu
==================================================*/

.cs-modal {
    width: min(760px, 100%);
}

.cs-heading {
    margin: 14px 0 8px;
    font-size: 0.95rem;
    color: var(--muted, #94a3b8);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Items working right now, under the summary. (Not .cs-chip: that's the
   casino's betting chips.) */
.cs-buffs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.cs-buffs-title {
    color: var(--muted, #94a3b8);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cs-buff {
    position: relative;
    display: inline-grid;
    gap: 1px;
    padding: 5px 12px 5px 24px;
    border: 1px solid rgba(250, 204, 21, 0.45);
    border-radius: var(--ff-r-md, 10px);
    background: rgba(250, 204, 21, 0.1);
    line-height: 1.2;
    text-align: left;
}

.cs-buff::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #facc15;
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.8);
    transform: translateY(-50%);
}

.cs-buff b {
    color: #fde68a;
    font-size: 0.78rem;
    font-weight: 800;
}

.cs-buff small {
    color: var(--text, #e2e8f0);
    font-size: 0.72rem;
    font-weight: 600;
}

.cs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cs-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--ff-r-lg, 12px);
    background: rgba(15, 23, 42, 0.55);
}

.cs-item.is-empty {
    opacity: 0.5;
}

.cs-potion {
    border-color: color-mix(in srgb, var(--pc, #a78bfa) 45%, transparent);
}

.cs-art {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: var(--ff-r-md, 10px);
    background: rgba(255, 255, 255, 0.05);
}

.cs-art svg {
    width: 44px;
    height: 44px;
}

.cs-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.cs-text strong {
    font-size: 0.9rem;
    line-height: 1.15;
}

.cs-text small {
    color: var(--muted, #94a3b8);
    font-size: 0.74rem;
    line-height: 1.3;
}

.cs-side {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.cs-side b {
    color: var(--gold, #facc15);
    font-variant-numeric: tabular-nums;
}

.cs-side button {
    min-width: 64px;
}

.cs-gloves {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(220, 38, 38, 0.55);
    border-radius: var(--ff-r-lg, 12px);
    background: rgba(69, 10, 10, 0.35);
}

.cs-gloves[hidden] {
    display: none;
}

.cs-gloves-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cs-glove {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    text-align: left;
}

.cs-glove span {
    display: grid;
    gap: 2px;
}

.cs-glove small {
    color: var(--muted, #94a3b8);
    font-size: 0.72rem;
}

.cs-glove-art svg {
    width: 40px;
    height: 40px;
}


/*==================================================
    Slot Machine
    A lit cabinet: three reels behind glass, three
    paylines across them, and a pull button below.
==================================================*/

.sl-modal {
    width: min(880px, 100%);
}

.sl-body {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.sl-cabinet {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 3px solid #b45309;
    border-radius: var(--ff-r-lg, 18px);
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(250, 204, 21, 0.18), transparent 60%),
        linear-gradient(180deg, #7f1d1d, #3b0a0a);
    box-shadow: inset 0 0 0 2px rgba(253, 230, 138, 0.35), 0 0 24px rgba(220, 38, 38, 0.3);
}

.sl-marquee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 6px;
    border-radius: var(--ff-r-md, 10px);
    background: #1c0606;
    font-family: var(--font-display, inherit);
    font-weight: 900;
    letter-spacing: 0.2em;
    color: #fde68a;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
}

.sl-marquee b {
    color: #ef4444;
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.9);
}

.sl-reels {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: var(--ff-r-lg, 12px);
    background: #111827;
    box-shadow: inset 0 6px 14px rgba(0, 0, 0, 0.7);
}

.sl-reel {
    --face: clamp(64px, 11vw, 96px);
    height: calc(var(--face) * 3);
    overflow: hidden;
    border-radius: var(--ff-r-md, 8px);
    background: linear-gradient(180deg, #cbd5e1, #f8fafc 18%, #f8fafc 82%, #cbd5e1);
    box-shadow: inset 0 10px 12px -8px rgba(0, 0, 0, 0.55), inset 0 -10px 12px -8px rgba(0, 0, 0, 0.55);
}

.sl-strip {
    display: grid;
    will-change: transform;
}

.sl-face {
    display: grid;
    place-items: center;
    height: var(--face);
}

.sl-face svg {
    width: 76%;
    height: 76%;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.25));
}

/* The paylines: dim until their row pays. */
.sl-row-line {
    position: absolute;
    left: 2px;
    right: 2px;
    height: 0;
    border-top: 2px dashed rgba(250, 204, 21, 0.25);
    pointer-events: none;
}

.sl-row-line[data-row="0"] { top: calc(8px + var(--face, 80px) * 0.5); }
.sl-row-line[data-row="1"] { top: calc(8px + var(--face, 80px) * 1.5); }
.sl-row-line[data-row="2"] { top: calc(8px + var(--face, 80px) * 2.5); }

.sl-reels {
    --face: clamp(64px, 11vw, 96px);
}

.sl-row-line.is-win {
    border-top: 4px solid #facc15;
    box-shadow: 0 0 12px 3px rgba(250, 204, 21, 0.85);
    animation: sl-win-line 0.9s ease-in-out infinite alternate;
}

@keyframes sl-win-line {
    from { opacity: 0.65; }
    to { opacity: 1; }
}

.sl-spin {
    display: grid;
    gap: 2px;
    justify-items: center;
    padding: 10px;
    border: 2px solid #fde68a !important;
    border-radius: var(--ff-r-lg, 14px);
    background: linear-gradient(180deg, #facc15, #d97706) !important;
    color: #451a03 !important;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: 0 4px 0 #78350f;
}

.sl-spin small {
    font-size: 0.75rem;
}

.sl-spin:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #78350f;
}

.sl-spin:disabled {
    filter: grayscale(0.6);
    opacity: 0.7;
}

.sl-result {
    min-height: 54px;
    padding: 8px 10px;
    border-radius: var(--ff-r-md, 10px);
    background: rgba(0, 0, 0, 0.35);
    color: #fef3c7;
}

.sl-result ul {
    display: grid;
    gap: 4px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.sl-result li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.sl-won-art svg {
    width: 26px;
    height: 26px;
}

.sl-result .sl-big {
    color: #fde047;
    font-size: 1.15rem;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.9);
}

.sl-result .sl-miss {
    color: #fca5a5;
}

.sl-modal.is-jackpot .sl-cabinet {
    animation: sl-jackpot 0.5s ease-in-out 6 alternate;
}

@keyframes sl-jackpot {
    from { box-shadow: inset 0 0 0 2px rgba(253, 230, 138, 0.35), 0 0 24px rgba(220, 38, 38, 0.3); }
    to { box-shadow: inset 0 0 0 2px #fde68a, 0 0 48px 10px rgba(250, 204, 21, 0.8); }
}

.sl-side h3 {
    margin: 0 0 8px;
}

.sl-paytable {
    display: grid;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.sl-paytable li {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.sl-pay-art {
    display: flex;
}

.sl-pay-art svg {
    width: 26px;
    height: 26px;
}

.sl-link {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0 !important;
    background: none !important;
    color: var(--gold, #facc15) !important;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
}

@media (max-width: 720px) {
    .cs-grid,
    .sl-body {
        grid-template-columns: 1fr;
    }

    .sl-reel,
    .sl-reels {
        --face: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sl-row-line.is-win,
    .sl-modal.is-jackpot .sl-cabinet {
        animation: none;
    }
}


/*==================================================
    Slot Machine pulls in the pond log
    Plain lines up to Rare; Epic and up are cards that
    get louder with the tier, and from Legendary they
    show the reels. The Jackpot runs marquee lights.
==================================================*/

.sl-log-prize {
    white-space: nowrap;
}

.sl-log-mini {
    display: inline-flex;
    gap: 1px;
    margin-right: 3px;
    vertical-align: -3px;
}

.sl-log-mini svg {
    width: 15px;
    height: 15px;
}

.activity-slots .sl-log-miss {
    color: var(--muted, #94a3b8);
}

.activity-entry.activity-slots.slots-rare {
    padding-left: 8px;
    border-left: 3px solid rgba(96, 165, 250, 0.75);
}

.activity-entry.card-slots {
    --slot-color: #a855f7;
    --card-shadow: 0 0 14px color-mix(in srgb, var(--slot-color) 40%, transparent);
    --card-flash: color-mix(in srgb, var(--slot-color) 70%, #ffffff);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--slot-color) 60%, transparent);
    border-left: 4px solid var(--slot-color);
    background:
        radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--slot-color) 30%, transparent), transparent 62%),
        linear-gradient(180deg, #2a0d0d, #140606);
}

.activity-entry.card-slots.slots-legendary { --slot-color: #f59e0b; }
.activity-entry.card-slots.slots-mythical { --slot-color: #ef4444; }
.activity-entry.card-slots.slots-eternal { --slot-color: #facc15; }

.sl-log-title {
    color: color-mix(in srgb, var(--slot-color) 65%, #ffffff);
    text-shadow: 0 0 8px color-mix(in srgb, var(--slot-color) 70%, transparent);
}

.sl-log-three {
    color: #fde68a;
}

.sl-log-reels {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.sl-log-row {
    display: inline-flex;
    gap: 1px;
    padding: 2px 4px;
    border-radius: var(--ff-r-md, 6px);
    background: rgba(0, 0, 0, 0.4);
    opacity: 0.45;
}

.sl-log-row.is-win {
    background: rgba(250, 204, 21, 0.16);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.75);
    opacity: 1;
}

.sl-log-row svg {
    width: 18px;
    height: 18px;
}

/* Mythical: the glow breathes. */
.activity-entry.card-slots.slots-mythical {
    animation: activity-card-in 1.2s ease-out, sl-log-pulse 2.4s ease-in-out 1.2s infinite;
}

@keyframes sl-log-pulse {
    0%, 100% { box-shadow: var(--card-shadow); }
    50% { box-shadow: 0 0 22px color-mix(in srgb, var(--slot-color) 65%, transparent); }
}

/* Eternal: gold, with a sheen sweeping across. */
.activity-entry.card-slots.slots-eternal::after,
.activity-entry.card-slots.slots-jackpot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 247, 173, 0.2) 48%, rgba(255, 255, 255, 0.3) 50%, transparent 62%);
    transform: translateX(-100%);
    animation: glove-card-sheen 4s ease-in-out 0.4s infinite;
    pointer-events: none;
}

.activity-entry.card-slots.slots-eternal .sl-log-title {
    background: linear-gradient(90deg, #f97316, #facc15, #fff7ad, #facc15, #f97316);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    animation: activity-mut-title 3.5s linear infinite;
}

/* The Jackpot: a lit cabinet, its marquee bulbs chasing round the edge. */
.activity-entry.card-slots.slots-jackpot {
    --slot-color: #facc15;
    --card-shadow: 0 0 22px rgba(250, 204, 21, 0.6), 0 0 40px rgba(220, 38, 38, 0.35);
    --card-flash: #fff7ad;
    padding: 9px 12px 11px 14px;
    border: 3px dotted #fde68a;
    border-left: 3px dotted #fde68a;
    background:
        radial-gradient(120% 140% at 50% 0%, rgba(250, 204, 21, 0.32), transparent 60%),
        linear-gradient(180deg, #7f1d1d, #3b0a0a);
    font-size: 0.86rem;
    animation: activity-card-in 1.2s ease-out, sl-log-bulbs 0.5s steps(2) infinite;
}

@keyframes sl-log-bulbs {
    from { border-color: #fde68a; }
    to { border-color: #ef4444; }
}

.sl-log-jackpot-title {
    display: inline-block;
    color: #fde047;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.95), 0 0 2px #7c2d12;
    animation: sl-log-flash 0.9s ease-in-out infinite alternate;
}

.sl-log-jackpot-text {
    color: #fde047;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
}

@keyframes sl-log-flash {
    from { opacity: 0.7; transform: scale(1); }
    to { opacity: 1; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    .activity-entry.card-slots,
    .activity-entry.card-slots::after,
    .sl-log-title,
    .sl-log-jackpot-title {
        animation: none !important;
    }
}
