/* public/css/reduceri.css — styles for the daily game deals page. */

.reduceri-main {
    padding-top: 72px;
    min-height: 100vh;
}

.reduceri-hero {
    padding: 48px 0 24px;
}

.reduceri-lead {
    max-width: 720px;
    margin: 0 auto 8px;
}

.reduceri-updated {
    margin: 0;
}

.reduceri-section {
    padding: 24px 0 40px;
}

.reduceri-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding: 0 4px;
}

.reduceri-section-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-color);
}

.reduceri-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reduceri-store-badge--steam {
    background: rgba(23, 26, 33, 0.92);
    color: #66c0f4;
    border: 1px solid rgba(102, 192, 244, 0.4);
}

.reduceri-store-badge--epic {
    background: #313131;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reduceri-section-sub {
    font-size: 0.82rem;
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 500;
}

.reduceri-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.reduceri-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 0 4px;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.85;
}

.reduceri-sort-select {
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(20, 184, 166, 0.4);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.reduceri-sort-select:focus {
    outline: none;
    border-color: #14b8a6;
}

body.dark-theme .reduceri-sort-select {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(45, 212, 191, 0.4);
}

.reduceri-filter {
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.reduceri-filter:hover {
    background: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.6);
}

.reduceri-filter.is-active {
    background: #14b8a6;
    color: #fff;
    border-color: #14b8a6;
}

body.dark-theme .reduceri-filter {
    border-color: rgba(45, 212, 191, 0.4);
}
body.dark-theme .reduceri-filter:hover {
    background: rgba(45, 212, 191, 0.12);
}
body.dark-theme .reduceri-filter.is-active {
    background: #2dd4bf;
    color: #052e2b;
    border-color: #2dd4bf;
}

.reduceri-card-discount--upcoming {
    background: #14b8a6;
    color: #fff;
}

.reduceri-card-flag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.02em;
}

.reduceri-card-type-tag {
    position: absolute;
    top: 38px;
    left: 10px;
    background: rgba(20, 184, 166, 0.92);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

.reduceri-card-type-tag-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 0 5px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0;
}

/* Compact list of constituent game names parsed from the bundle title. */
.reduceri-card-bundle-list {
    font-size: 0.78rem;
    color: var(--text-color);
    opacity: 0.78;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    line-height: 1.3;
}

.reduceri-card-bundle-list i {
    opacity: 0.8;
}

.reduceri-card-bundle-list span {
    font-weight: 600;
}

.reduceri-card-bundle-sep {
    opacity: 0.4;
    font-weight: 400 !important;
}

body.dark-theme .reduceri-card-bundle-list {
    opacity: 0.85;
}

/* Bundle hint — sub-line under price that tells the user to click through to see the
   constituent games on the Steam bundle page. */
.reduceri-card-bundle-hint {
    font-size: 0.78rem;
    color: #14b8a6;
    font-weight: 600;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.9;
    transition: opacity 0.15s ease;
}

body.dark-theme .reduceri-card-bundle-hint {
    color: #2dd4bf;
}

.reduceri-card:hover .reduceri-card-bundle-hint {
    opacity: 1;
    text-decoration: underline;
}

/* Steam review badge — colored according to Steam's own scale. */
.reduceri-card-review {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    width: max-content;
    max-width: 100%;
    line-height: 1.3;
}

.reduceri-card-review.is-overwhelmingly-positive { background: #66c0f4; color: #042033; }
.reduceri-card-review.is-very-positive          { background: #57cbde; color: #042033; }
.reduceri-card-review.is-positive               { background: #8fc7e8; color: #042033; }
.reduceri-card-review.is-mixed                  { background: #a3a39c; color: #1c1c1c; }
.reduceri-card-review.is-negative               { background: #a34c25; color: #fff; }
.reduceri-card-review.is-neutral                { background: rgba(120,120,120,0.4); color: #fff; }

/* 18+ age badge — bottom-right corner of the cover image. */
.reduceri-card-mature {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 6px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
    letter-spacing: 0.04em;
    line-height: 1;
}

/* Shell wrapper so the copy button sits next to the linked card without being inside the <a>. */
.reduceri-card-shell {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Mystery / no-URL placeholder cards */
.reduceri-card--inert {
    pointer-events: none;
    opacity: 0.85;
}

/* Copy-title button — top-right of the card shell, above everything. */
.reduceri-card-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.reduceri-card-copy:hover {
    background: rgba(20, 184, 166, 0.9);
    transform: scale(1.05);
}

/* Make sure the discount badge doesn't overlap the copy button. Shift discount slightly left when copy present. */
.reduceri-card-shell .reduceri-card-discount {
    right: 50px;
}

/* Toast feedback for the copy action. */
.reduceri-copy-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 16px);
    background: rgba(20, 184, 166, 0.95);
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 9999;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reduceri-copy-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.reduceri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.reduceri-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-color);
    opacity: 0.65;
    padding: 36px 16px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin: 0;
}

body.dark-theme .reduceri-empty {
    border-color: rgba(255, 255, 255, 0.15);
}

.reduceri-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.reduceri-card:hover {
    transform: translateY(-3px);
    border-color: rgba(20, 184, 166, 0.55);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

body.dark-theme .reduceri-card {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.reduceri-card-image {
    position: relative;
    aspect-ratio: 460 / 215;
    overflow: hidden;
    background: #000;
}

.reduceri-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Themed placeholder shown when a card has no image (common for ITAD bundles). */
.reduceri-card-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 18px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
}

.reduceri-card-placeholder.is-bundle {
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.18), transparent 55%),
        linear-gradient(135deg, #0f766e 0%, #14b8a6 60%, #2dd4bf 100%);
}

.reduceri-card-placeholder.is-game {
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.18), transparent 55%),
        linear-gradient(135deg, #6d28d9 0%, #7c3aed 60%, #a78bfa 100%);
}

/* Stacked-cards effect for bundle placeholders — visually conveys "multiple games inside". */
.reduceri-card-placeholder.is-bundle::before,
.reduceri-card-placeholder.is-bundle::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    pointer-events: none;
}

.reduceri-card-placeholder.is-bundle::before {
    transform: rotate(-4deg) translateY(8px);
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.35), rgba(45, 212, 191, 0.45));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    z-index: 0;
}

.reduceri-card-placeholder.is-bundle::after {
    transform: rotate(3deg) translateY(4px);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.55), rgba(94, 234, 212, 0.55));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.reduceri-card-placeholder.is-bundle > * {
    position: relative;
    z-index: 2;
}

.reduceri-card-placeholder i {
    font-size: 2.4rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.reduceri-card-placeholder span {
    font-size: 0.95rem;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.reduceri-card-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4c6b22;
    color: #beee11;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 4px 10px;
    border-radius: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.reduceri-card-discount--free {
    background: #14b8a6;
    color: #fff;
}

.reduceri-card-store {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.reduceri-card-store--steam {
    color: #66c0f4;
}

.reduceri-card-store--epic {
    color: #fff;
}

.reduceri-card-body {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.reduceri-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reduceri-card-prices {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.reduceri-card-price-original {
    color: var(--text-color);
    opacity: 0.55;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.reduceri-card-price-final {
    color: #14b8a6;
    font-weight: 800;
    font-size: 1.05rem;
}

.reduceri-card-price-final.is-free {
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1rem;
}

body.dark-theme .reduceri-card-price-final {
    color: #2dd4bf;
}

body.dark-theme .reduceri-card-price-final.is-free {
    color: #fbbf24;
}

.reduceri-card-date {
    font-size: 0.78rem;
    color: var(--text-color);
    opacity: 0.7;
}

.reduceri-section-more {
    margin-top: 20px;
    text-align: center;
}

.reduceri-section-more a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(20, 184, 166, 0.45);
    border-radius: 999px;
    color: #0f766e;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.reduceri-section-more a:hover {
    background: #14b8a6;
    border-color: #14b8a6;
    color: #fff;
    text-decoration: none;
}

body.dark-theme .reduceri-section-more a {
    color: #5eead4;
    border-color: rgba(94, 234, 212, 0.45);
}

body.dark-theme .reduceri-section-more a:hover {
    background: rgba(94, 234, 212, 0.18);
    color: #99f6e4;
}

/* SteamDB-inspired mini price-history sparkline, rendered on cards with `priceHistory` data
   (currently just the "Recomandate & pozitive" section). */
.reduceri-card-spark {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(20, 184, 166, 0.06);
    border: 1px solid rgba(20, 184, 166, 0.18);
}

body.dark-theme .reduceri-card-spark {
    background: rgba(45, 212, 191, 0.08);
    border-color: rgba(45, 212, 191, 0.22);
}

.reduceri-card-spark-svg {
    width: 100%;
    height: 36px;
    display: block;
}

.reduceri-card-spark-area {
    fill: rgba(20, 184, 166, 0.18);
}

body.dark-theme .reduceri-card-spark-area {
    fill: rgba(45, 212, 191, 0.22);
}

.reduceri-card-spark-line {
    fill: none;
    stroke: #14b8a6;
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

body.dark-theme .reduceri-card-spark-line {
    stroke: #2dd4bf;
}

.reduceri-card-spark-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-color);
    line-height: 1.2;
}

.reduceri-card-spark-low {
    font-weight: 700;
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

body.dark-theme .reduceri-card-spark-low {
    color: #5eead4;
}

.reduceri-card-spark-date {
    opacity: 0.65;
    font-weight: 500;
    white-space: nowrap;
}

.reduceri-card-spark-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.reduceri-card-spark-range {
    font-size: 0.66rem;
    color: var(--text-color);
    opacity: 0.5;
    font-style: italic;
}

/* External SteamDB link — small chip with hover affordance. onclick stops bubbling so it
   doesn't trigger the outer card-link navigation. */
.reduceri-card-spark-steamdb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #0f766e;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.3);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.reduceri-card-spark-steamdb:hover {
    background: #14b8a6;
    color: #fff;
    border-color: #14b8a6;
    text-decoration: none;
}

body.dark-theme .reduceri-card-spark-steamdb {
    color: #5eead4;
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.35);
}

body.dark-theme .reduceri-card-spark-steamdb:hover {
    background: rgba(45, 212, 191, 0.28);
    color: #ccfbf1;
}

.reduceri-disclaimer {
    padding: 24px 0 64px;
}

@media (max-width: 575.98px) {
    .reduceri-hero {
        padding: 36px 0 16px;
    }
    .reduceri-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 14px;
    }
    .reduceri-card-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 419.98px) {
    .reduceri-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .reduceri-card-title {
        font-size: 1rem;
    }
}
