/* Lessico theme art - one generic layer for every theme. game.js sets data-art-<part> on <body>
   and a matching --art-<part> image variable for each file a theme lists in themes.js.
   A theme without a file keeps the plain CSS look for that part. See THEME-SPEC.md. */

/* Backgrounds */
body[data-art-background] .app{background:var(--art-background) center/cover no-repeat}
@media (orientation:landscape){body[data-art-background-wide] .app{background-image:var(--art-background-wide)}}

/* Title flourish: a painted underline under the live "Lessico" wordmark. */
body[data-art-title] .wordmark::after{content:"";display:block;height:12px;margin:3px auto 0;width:130px;background:var(--art-title) center/contain no-repeat}

/* Letter tiles and the plate (letters stay live text on top) */
body[data-art-tile] .letter{background:var(--art-tile) center/100% 100% no-repeat;border:0;box-shadow:none}
body[data-art-tile-used] .letter.used{background:var(--art-tile-used) center/100% 100% no-repeat;border:0;color:var(--ink);box-shadow:0 0 0 2px var(--ink)}
/* With tile art, results show as a colored ring (the tile art itself doesn't change color). */
body[data-art-tile] .letter.flash-good{background-image:var(--art-tile-used);color:var(--ink);box-shadow:0 0 0 3px var(--good)}
body[data-art-tile] .letter.flash-bad{background-image:var(--art-tile);color:var(--bad);box-shadow:0 0 0 3px var(--bad)}
body[data-art-tile] .letter.flash-repeat{background-image:var(--art-tile);box-shadow:0 0 0 3px #b99a5c}
body[data-art-plate] .wheel{background:var(--art-plate) center/100% 100% no-repeat;border:0;box-shadow:none}

/* Word spaces: each letter space is an empty tile set into grout; solved letters become glazed tiles. */
body[data-art-slot] .cell{background:var(--art-slot) center/100% 100% no-repeat;border-radius:0}
body[data-art-slot-solved] .slot.solved .cell,body[data-art-slot-solved] .cell.revealed{background:var(--art-slot-solved) center/100% 100% no-repeat;box-shadow:none}
body[data-art-slot] .slot{background:var(--wall-2);border-color:var(--grout)}
body[data-art-slot] .slot.solved{background:var(--solved-bg,#e6ebdd)}

/* Panels and buttons (stretchable) */
body[data-art-panel] .group,body[data-art-panel] .book-summary{border:16px solid transparent;border-image:var(--art-panel) 100 fill / 16px stretch;background:none}
body[data-art-button] .action{border:12px solid transparent;border-image:var(--art-button) 100 fill / 12px stretch;background:none;box-shadow:none;padding:0}

/* Icons (art replaces the text symbol) */
body[data-art-icon-home] .icon-home,body[data-art-icon-settings] .icon-settings,body[data-art-icon-book] .icon-book,
body[data-art-icon-shuffle] .icon-shuffle,body[data-art-icon-hint] .icon-hint,body[data-art-icon-enter] .icon-enter{width:26px;height:26px;color:transparent;background:center/contain no-repeat}
body[data-art-icon-home] .icon-home{background-image:var(--art-icon-home)}
body[data-art-icon-settings] .icon-settings{background-image:var(--art-icon-settings)}
body[data-art-icon-book] .icon-book{background-image:var(--art-icon-book)}
body[data-art-icon-shuffle] .icon-shuffle{background-image:var(--art-icon-shuffle)}
body[data-art-icon-hint] .icon-hint{background-image:var(--art-icon-hint)}
body[data-art-icon-enter] .icon-enter{background-image:var(--art-icon-enter)}

/* Header buttons on ceramic: Home and Settings tiles, Discovery Book medallion. */
body[data-art-home-button] .home-link,body[data-art-settings-button] #open-menu,body[data-art-book-button] #open-book{background:center/100% 100% no-repeat;border-radius:0}
body[data-art-home-button] .home-link{background-image:var(--art-home-button)}
body[data-art-settings-button] #open-menu{background-image:var(--art-settings-button)}
body[data-art-book-button] #open-book{background-image:var(--art-book-button)}
body[data-art-home-button] .header-actions{gap:6px}
body[data-art-home-button] .topbar .icon{width:24px;height:24px}

/* Action buttons: raised ceramic, icon above the live label. */
body[data-art-action-button] .action{border:0;border-image:none;background:var(--art-action-button) center/100% 100% no-repeat;box-shadow:none;
  flex-direction:column;gap:0;min-height:58px;padding:6px 4px 9px;font-size:14px}
body[data-art-action-button] .action .icon{width:22px;height:22px}
body[data-art-action-button] .action:active{transform:translateY(1px)}

/* Wall tiles use the theme's own tiles when it has them. */
body[data-art-slot-solved] .wall-tile.relaxed{background:var(--art-slot-solved) center/100% 100% no-repeat;border:0}
body[data-art-tile] .wall-tile.challenge{background:var(--art-tile) center/100% 100% no-repeat;border:0}
body[data-art-wall-tile] .wall-tile.challenge{background-image:var(--art-wall-tile)}
body[data-art-tile-used] .wall-tile.expert{background:var(--art-tile-used) center/100% 100% no-repeat;border:0}
body[data-art-title] .wall-border{background:var(--art-title) center/100% 100% no-repeat;opacity:1;height:14px}

/* Celebration tiles use the theme's own tiles. */
body[data-art-slot-solved] .celebrate-tiles span{background:var(--art-slot-solved) center/100% 100% no-repeat;border:0}
body[data-art-tile-used] .celebrate-tiles span:nth-child(2){background-image:var(--art-tile-used)}
body[data-art-wall-tile] .celebrate-tiles span:nth-child(3){background-image:var(--art-wall-tile)}

/* A primary Enter button, when the theme has one (label in the theme's light ink). */
body[data-art-enter-button] #submit{background-image:var(--art-enter-button);color:var(--enter-ink,#fff)}
body[data-art-enter-button] #submit .icon-enter{filter:brightness(0) invert(1) opacity(.92)}
