/**
 * Tolarian Spellbook — MTG Component Overrides
 * Allinea decklist, callouts, spotlight e tooltip al design system del tema
 * Attivo solo se mtg-engine è presente
 *
 * @package TolarianSpellbook
 */

/* ========================================================================
   Decklist — allineamento al tema child
   ======================================================================== */
.tsb-decklist-container {
    background: var(--ts-surface, var(--ts-white, #fff));
    border: 1px solid var(--ts-border, #e1e8ed);
    border-radius: 12px;
    margin: 28px 0;
    overflow: hidden;
}

.tsb-decklist-header {
    background: var(--ts-surface-2, var(--ts-lighter, #f8f9fa));
    padding: 18px 24px;
    border-bottom: 1px solid var(--ts-border, #e1e8ed);
}

.tsb-decklist-title {
    font-family: var(--ts-font-family-heading, inherit);
    font-size: 1.35rem;
    color: var(--ts-text, var(--ts-primary, #2c3e50));
}

/* ========================================================================
   Card Grid — responsive columns & high density
   ======================================================================== */
.tsb-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .tsb-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* ========================================================================
   Card Spotlight
   ======================================================================== */
.mtg-card-spotlight {
    background: var(--ts-surface, var(--ts-white, #fff));
    border: 1px solid var(--ts-border, #e1e8ed);
    border-radius: 12px;
    padding: 20px;
    margin: 28px 0;
}

.mtg-spotlight-name {
    color: var(--ts-text, var(--ts-primary, #2c3e50));
    font-family: var(--ts-font-family-heading, inherit);
}

/* Dark Mode Overrides */
[data-theme="dark"] .tsb-decklist-container,
.dark-mode .tsb-decklist-container {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .tsb-decklist-header,
.dark-mode .tsb-decklist-header {
    background: #0f172a;
    border-color: #334155;
}
[data-theme="dark"] .tsb-decklist-title,
.dark-mode .tsb-decklist-title {
    color: #f1f5f9;
}
[data-theme="dark"] .mtg-card-spotlight,
.dark-mode .mtg-card-spotlight {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .mtg-spotlight-name,
.dark-mode .mtg-spotlight-name {
    color: #f1f5f9;
}

/* ========================================================================
   Foil shimmer
   ======================================================================== */
.mtg-card-tooltip.is-foil {
    background: linear-gradient(90deg, #b8860b, #ffd700, #ff8c00, #b8860b);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    animation: mtg-foil-shimmer 4s ease infinite;
}

@keyframes mtg-foil-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}