/*
 * EthereumRoll conversion framework
 * ---------------------------------
 * Shared visual primitives for casino/game/bonus/tournament pages.
 * All styling via CSS custom properties so themes (and Elementor custom
 * CSS) can override without forking the plugin.
 *
 * Conventions:
 *   --ethr-*            tokens you can override
 *   .ethr-*             block-scoped classes (BEM-lite)
 *   no external fonts, no JS dependencies
 */

:root {
    /* Palette — deliberately muted so it plays nicely with any Elementor theme */
    --ethr-accent:          #ef4444;
    --ethr-accent-hover:    #dc2626;
    --ethr-success:         #16a34a;
    --ethr-warning:         #d97706;
    --ethr-text:            #111827;
    --ethr-muted:           #6b7280;
    --ethr-border:          #e5e7eb;
    --ethr-surface:         #ffffff;
    --ethr-surface-alt:     #f9fafb;
    --ethr-trust-bg:        #0f172a;
    --ethr-trust-text:      #f1f5f9;
    --ethr-warning-bg:      #fef3c7;
    --ethr-warning-text:    #92400e;

    /* Rhythm */
    --ethr-radius:          8px;
    --ethr-radius-lg:       12px;
    --ethr-shadow-card:     0 1px 2px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.04);
    --ethr-shadow-cta:      0 4px 14px rgba(239,68,68,0.25);

    /* Typography scale */
    --ethr-font-xs:         0.75rem;
    --ethr-font-sm:         0.875rem;
    --ethr-font-md:         1rem;
    --ethr-font-lg:         1.125rem;
    --ethr-font-xl:         1.5rem;
    --ethr-font-2xl:        2rem;
}

/* ========================================================================
 * Trust stripe — appears on casino/bonus/tournament cards + hero blocks.
 * Rating, license, "last tested" in one horizontal bar. Consistent visual
 * anchor across the whole site so repeat visitors scan it subconsciously.
 * ========================================================================*/

.ethr-trust-stripe {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
    padding: 0.6rem 1rem;
    background: var(--ethr-trust-bg);
    color: var(--ethr-trust-text);
    border-radius: var(--ethr-radius);
    font-size: var(--ethr-font-sm);
    line-height: 1.3;
}
.ethr-trust-stripe__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.ethr-trust-stripe__icon {
    opacity: 0.7;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.ethr-trust-stripe__label {
    opacity: 0.6;
    font-size: var(--ethr-font-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ethr-trust-stripe__value {
    font-weight: 600;
}
.ethr-trust-stripe__value--good  { color: #86efac; }
.ethr-trust-stripe__value--warn  { color: #fde68a; }

/* ========================================================================
 * Primary CTA button — the single conversion action per page.
 * Chunky, obvious, no ambiguity. Same visual everywhere.
 * ========================================================================*/

.ethr-cta,
.ethr-review__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    background: var(--ethr-accent);
    color: #ffffff;
    font-weight: 700;
    font-size: var(--ethr-font-md);
    text-decoration: none;
    border-radius: var(--ethr-radius);
    box-shadow: var(--ethr-shadow-cta);
    transition: background-color .15s ease, transform .1s ease;
    border: 0;
    cursor: pointer;
    min-height: 48px;
    line-height: 1.2;
}
.ethr-cta:hover,
.ethr-review__cta:hover {
    background: var(--ethr-accent-hover);
    color: #ffffff;
    transform: translateY(-1px);
}
.ethr-cta:active,
.ethr-review__cta:active { transform: translateY(0); }

.ethr-cta--secondary {
    background: transparent;
    color: var(--ethr-text);
    border: 2px solid var(--ethr-border);
    box-shadow: none;
}
.ethr-cta--secondary:hover {
    background: var(--ethr-surface-alt);
    color: var(--ethr-text);
    border-color: var(--ethr-accent);
}

/* Under-CTA disclaimer — tiny, muted */
.ethr-review__cta-disclaimer,
.ethr-cta-disclaimer {
    margin-top: 0.5rem;
    font-size: var(--ethr-font-xs);
    color: var(--ethr-muted);
}

/* ========================================================================
 * Card system — used for casino cards, game cards, bonus cards, etc.
 * Consistent geometry regardless of content type.
 * ========================================================================*/

.ethr-card {
    background: var(--ethr-surface);
    border: 1px solid var(--ethr-border);
    border-radius: var(--ethr-radius-lg);
    box-shadow: var(--ethr-shadow-card);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.ethr-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 10px 30px rgba(0,0,0,0.06);
}
.ethr-card__media {
    aspect-ratio: 16 / 9;
    background: var(--ethr-surface-alt);
    overflow: hidden;
}
.ethr-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ethr-card__body { padding: 1rem 1.25rem; }
.ethr-card__title {
    font-size: var(--ethr-font-lg);
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--ethr-text);
    line-height: 1.25;
}
.ethr-card__meta {
    font-size: var(--ethr-font-sm);
    color: var(--ethr-muted);
    margin: 0 0 0.75rem;
}
.ethr-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem 1.25rem;
}
.ethr-card__footer .ethr-cta { flex: 1; }

/* ========================================================================
 * Sticky mobile CTA — appears fixed at bottom on mobile casino review
 * pages. Standard affiliate-site pattern; converts significantly better
 * than scroll-dependent CTAs.
 * ========================================================================*/

.ethr-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: var(--ethr-surface);
    border-top: 1px solid var(--ethr-border);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    display: none; /* shown only on narrow screens */
}
.ethr-sticky-cta .ethr-cta { width: 100%; }

@media (max-width: 768px) {
    .ethr-sticky-cta { display: block; }
    /* Give the page bottom padding so content isn't hidden behind the sticky bar */
    body.ethr-has-sticky { padding-bottom: 88px; }
}

/* ========================================================================
 * Random casino button — 🎲 button for "try a random casino" feature.
 * Variants: primary (red) and secondary (outlined).
 * ========================================================================*/

.ethr-random-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--ethr-radius);
    font-weight: 700;
    text-decoration: none;
    transition: transform .1s ease, background-color .15s ease;
    min-height: 48px;
    line-height: 1.2;
}
.ethr-random-btn__icon {
    font-style: normal;
    font-size: 1.25em;
    display: inline-block;
    animation: ethr-dice-shake 3s infinite;
}
.ethr-random-btn--primary {
    background: var(--ethr-accent);
    color: #ffffff;
    box-shadow: var(--ethr-shadow-cta);
}
.ethr-random-btn--primary:hover {
    background: var(--ethr-accent-hover);
    color: #ffffff;
    transform: translateY(-1px);
}
.ethr-random-btn--secondary {
    background: transparent;
    color: var(--ethr-text);
    border: 2px solid var(--ethr-border);
}
.ethr-random-btn--secondary:hover {
    border-color: var(--ethr-accent);
    color: var(--ethr-text);
}
@keyframes ethr-dice-shake {
    0%, 90%, 100% { transform: rotate(0); }
    92% { transform: rotate(-15deg); }
    94% { transform: rotate(15deg); }
    96% { transform: rotate(-10deg); }
    98% { transform: rotate(5deg); }
}

/* ========================================================================
 * Entity page layouts — shared layout for game, tournament, bonus pages.
 * ========================================================================*/

.ethr-game-page,
.ethr-tournament-page,
.ethr-bonus-page {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Game page */
.ethr-game__header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.ethr-game__art {
    flex: 0 0 260px;
    max-width: 100%;
    border-radius: var(--ethr-radius-lg);
    overflow: hidden;
    box-shadow: var(--ethr-shadow-card);
}
.ethr-game__art img {
    display: block;
    width: 100%;
    height: auto;
}
.ethr-game__head-text h1 {
    margin: 0 0 0.3rem;
    font-size: var(--ethr-font-2xl);
    line-height: 1.2;
}
.ethr-game__provider-link {
    margin: 0;
    color: var(--ethr-muted);
    font-size: var(--ethr-font-md);
}
.ethr-game__provider-link a {
    color: var(--ethr-accent);
    text-decoration: none;
}
.ethr-game__provider-link a:hover { text-decoration: underline; }

.ethr-game__facts,
.ethr-tournament__facts,
.ethr-bonus__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--ethr-surface-alt);
    border-radius: var(--ethr-radius);
    margin-bottom: 1.5rem;
}
.ethr-game__facts > div,
.ethr-tournament__facts > div,
.ethr-bonus__facts > div {
    display: flex;
    flex-direction: column;
}
.ethr-game__facts dt,
.ethr-tournament__facts dt,
.ethr-bonus__facts dt {
    font-size: var(--ethr-font-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ethr-muted);
    margin: 0 0 0.2rem;
}
.ethr-game__facts dd,
.ethr-tournament__facts dd,
.ethr-bonus__facts dd {
    margin: 0;
    font-weight: 600;
}
.ethr-game__body,
.ethr-tournament__body,
.ethr-bonus__body {
    font-size: var(--ethr-font-md);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

/* Related games grid */
.ethr-related-games {
    padding-top: 1rem;
    border-top: 1px solid var(--ethr-border);
}
.ethr-related-games h2 {
    margin-top: 0;
    font-size: var(--ethr-font-xl);
}
.ethr-related-games__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.ethr-related-game-card {
    display: block;
    background: var(--ethr-surface);
    border: 1px solid var(--ethr-border);
    border-radius: var(--ethr-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}
.ethr-related-game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ethr-shadow-card);
}
.ethr-related-game-card__art {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--ethr-surface-alt);
}
.ethr-related-game-card__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ethr-related-game-card__body { padding: 0.75rem 0.9rem; }
.ethr-related-game-card__title {
    font-weight: 700;
    font-size: var(--ethr-font-sm);
    line-height: 1.25;
    margin-bottom: 0.2rem;
}
.ethr-related-game-card__provider {
    font-size: var(--ethr-font-xs);
    color: var(--ethr-muted);
}

/* Tournament status badge */
.ethr-tournament__status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: var(--ethr-font-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}
.ethr-tournament__status--live     { background: var(--ethr-success); color: #ffffff; }
.ethr-tournament__status--upcoming { background: var(--ethr-warning); color: #ffffff; }
.ethr-tournament__status--ended    { background: var(--ethr-muted); color: #ffffff; }

.ethr-tournament__prize-pool {
    font-size: var(--ethr-font-lg);
    margin: 0.3rem 0 0;
}
.ethr-tournament__prize-pool strong {
    color: var(--ethr-accent);
    font-size: 1.25em;
}
.ethr-tournament__casinos { margin-top: 2rem; }
.ethr-tournament__casinos-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}
.ethr-tournament__terms-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: var(--ethr-font-sm);
    color: var(--ethr-muted);
}
.ethr-tournament__terms-link a { color: inherit; }

/* Bonus page */
.ethr-bonus__headline {
    font-size: var(--ethr-font-xl);
    color: var(--ethr-accent);
    font-weight: 700;
    margin: 0.4rem 0 0.8rem;
}
.ethr-bonus__casino-link {
    margin: 0 0 1rem;
    color: var(--ethr-muted);
}
.ethr-bonus__casino-link a { color: var(--ethr-accent); text-decoration: none; }
.ethr-bonus__terms-notes {
    padding: 1rem 1.25rem;
    background: var(--ethr-warning-bg);
    color: var(--ethr-warning-text);
    border-radius: var(--ethr-radius);
    margin-bottom: 1.5rem;
}
.ethr-bonus__terms-notes h3 {
    margin: 0 0 0.3rem;
    font-size: var(--ethr-font-md);
}
.ethr-bonus__terms-notes p { margin: 0; font-size: var(--ethr-font-sm); }
.ethr-bonus__cta-row {
    margin-top: 2rem;
    text-align: center;
}

/* ========================================================================
 * Chip lists (cryptos, providers). Used in Elementor HTML widgets too.
 * ========================================================================*/

.ethr-crypto-chips,
.ethr-provider-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.25rem 0;
}
.ethr-crypto-chip,
.ethr-provider-chip {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--ethr-surface-alt);
    border: 1px solid var(--ethr-border);
    border-radius: 4px;
    font-size: var(--ethr-font-xs);
    color: var(--ethr-text);
    font-family: Menlo, Consolas, monospace;
    font-weight: 600;
}
.ethr-crypto-chip { text-transform: uppercase; letter-spacing: 0.05em; }
.ethr-provider-chip { font-family: inherit; }

/* Pros / Cons lists (used by Elementor HTML widgets) */
.ethr-pros-list,
.ethr-cons-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}
.ethr-pros-list li,
.ethr-cons-list li {
    padding: 0.4rem 0 0.4rem 1.6rem;
    position: relative;
    line-height: 1.5;
}
.ethr-pros-list li::before {
    content: '✓';
    position: absolute;
    left: 0.2rem;
    top: 0.4rem;
    color: var(--ethr-success);
    font-weight: 800;
}
.ethr-cons-list li::before {
    content: '✕';
    position: absolute;
    left: 0.2rem;
    top: 0.4rem;
    color: var(--ethr-accent);
    font-weight: 800;
}
.ethr-payment-methods-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.ethr-payment-methods-list li {
    padding: 0.3rem 0.75rem;
    background: var(--ethr-surface-alt);
    border: 1px solid var(--ethr-border);
    border-radius: 4px;
    font-size: var(--ethr-font-sm);
}

/* ========================================================================
 * Empty states + restriction notices
 * ========================================================================*/

.ethr-empty,
.ethr-entity-empty {
    padding: 2rem;
    background: var(--ethr-surface-alt);
    border-radius: var(--ethr-radius);
    text-align: center;
    color: var(--ethr-muted);
}

/* ========================================================================
 * Dark mode — respects user preference but not forced.
 * ========================================================================*/

@media (prefers-color-scheme: dark) {
    :root.ethr-dark-auto,
    .ethr-dark-auto {
        --ethr-text:         #f3f4f6;
        --ethr-muted:        #9ca3af;
        --ethr-border:       #374151;
        --ethr-surface:      #111827;
        --ethr-surface-alt:  #1f2937;
    }
}
