/* CASINOIR illustration surfaces. Nine-slice sizing keeps the engraved corners intact. */
body[data-casinoir-build] {
  --casinoir-lacquer: url('./assets/ui/casinoir-art-v05600/frame-panel.webp?v=06800');
  --casinoir-enamel: url('./assets/ui/casinoir-art-v05600/frame-button.webp?v=06800');
  --casinoir-entrance: url('./assets/ui/casinoir-art-v05600/frame-entry.webp?v=06800');
  --casinoir-oxblood: url('./assets/ui/casinoir-art-v05600/frame-alert.webp?v=06800');
}

body[data-casinoir-build] :is(
  .screen:not(:is(#home, #floor, #character, #collection, #shop, #profile)) > .home-bottom-nav > button,
  #pokerRoom .cash-table-card, #pokerRoom .tournament-hero-card,
  #floor.screen:not(#home).screen--grand-floor .gf-card,
  .bjo-lobby, .online-lobby, .casinoir-surface-wallet
) {
  border-color: transparent !important;
  border-image: var(--casinoir-lacquer) 40 fill / 11px stretch !important;
  background: none !important;
  box-shadow: none !important;
}

body[data-casinoir-build] :is(
  .system-menu-panel, .save-vault-panel, .onboarding-panel, .live-inbox-panel,
  .home-background-panel, .home-background-preview-panel, .daily-mission-panel,
  .today-board-panel, .weekly-challenge-panel, .activity-journal-panel,
  .story-reader-dialogue, .mc2-panel, .casinoir-update-panel
) {
  border-color: transparent !important;
  border-image: var(--casinoir-lacquer) 44 fill / 18px stretch !important;
  background: none !important;
  box-shadow: 0 16px 54px #0009 !important;
}

body[data-casinoir-build] :is(
  .system-settings-card, #landing .account-entry, .poker-mode-tabs, .bjo-wallet
) {
  border-color: transparent !important;
  border-image: var(--casinoir-lacquer) 37 fill / 10px stretch !important;
  background: none !important;
}

body[data-casinoir-build] :is(
  #floor.screen:not(#home).screen--grand-floor .gf-enter, #floor .gf-carousel-controls > button, #floor .gf-room-link,
  #floor .grand-floor-back, #pokerRoom [data-cash-table],
  #pokerRoom .poker-mode-tabs > button:not([data-poker-mode-tab="beginner"][aria-selected="true"]),
  #pokerRoom .tournament-enter, .system-settings-actions > button,
  #landing .account-entry__actions > button,
  .bjo-lobby button, .online-lobby button, .bjo-header > button,
  .action-buttons > button, .bj-console-actions > button:not([data-bj-bet]),
  .ba-actions > button, .rt-actions > button, .tcp-actions > button, .cr-actions > button,
  .holdem-online-actions > button, .system-menu-foot > button,
  .onboarding-foot button
) {
  border-color: transparent !important;
  border-image: var(--casinoir-enamel) 35 fill / 9px stretch !important;
  background: none !important;
  box-shadow: none !important;
  color: #f9ecd3 !important;
}

body[data-casinoir-build] :is(
  .action-button--fold, .action-button--allin, #threeCardFold,
  [data-bj-action="surrender"], [data-bj-action="decline_insurance"],
  #blackjackBetClear, #baccaratClear, #rouletteClear, #threeCardClear, #crapsClear,
  [data-account-mode="delete"]
) {
  border-image-source: var(--casinoir-oxblood) !important;
}

body[data-casinoir-build] :is(
  #home .home-floor-button--hero, #landing .enter-button
) {
  border-color: transparent !important;
  border-image: var(--casinoir-entrance) 52 fill / 17px stretch !important;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
body[data-casinoir-build] #home .home-floor-button--hero > .home-floor-button__icon {
  width: clamp(34px, 5.2vw, 66px) !important;
  height: clamp(34px, 5.2vw, 66px) !important;
  padding: 3px !important;
}
body[data-casinoir-build] #home .home-side-nav > .home-side-nav__art-button::before { display: none !important; }
body[data-casinoir-build] #home .home-utility-action .home-util-icon--art {
  height: clamp(23px, 3.65vw, 48px) !important;
  width: clamp(23px, 3.65vw, 48px) !important;
}

body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .grand-floor-topbar {
  grid-template-columns: auto minmax(0,1fr) auto auto auto !important;
  gap: clamp(4px, 1.05vw, 12px) !important;
  align-items: center !important;
}
body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .grand-floor-topbar .gf-room-link {
  grid-column: auto !important;
  grid-row: auto !important;
  white-space: nowrap;
}
body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .gf-intro {
  flex: 0 0 auto !important;
  min-height: 36px !important;
  align-items: flex-start !important;
  padding: 5px 92px 5px 10px !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .gf-intro::before,
body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .gf-card::after { display: none !important; }
body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .gf-intro > p {
  font: 600 clamp(13px, 1.5vw, 20px)/1.3 system-ui, sans-serif !important;
  letter-spacing: .06em !important;
}
body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .gf-carousel-controls { bottom: 3px; }
body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .gf-emblem > img {
  padding: 0 !important;
  object-fit: cover !important;
  object-position: center 57% !important;
}
body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .gf-online-actions .gf-enter {
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
  padding-inline: 2px !important;
  font-size: clamp(10px, 1.2vw, 13px) !important;
}
.casinoir-art-glyph {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  object-fit: contain;
  vertical-align: -.13em;
  pointer-events: none;
}
.casinoir-art-glyph--forward { transform: scaleX(-1); }

body[data-casinoir-build] #home .account-entry--home { bottom: calc(100% + 23px); }
body[data-casinoir-build] #home .home-toast { pointer-events: none; }
body[data-casinoir-build] .account-entry__actions > [data-account-start="login"] {
  border-image-source: var(--casinoir-lacquer) !important;
}
body[data-casinoir-build] #pokerRoom .poker-mode-tabs > button:not([aria-selected="true"]) {
  border-image-source: var(--casinoir-lacquer) !important;
}

@media (min-width: 1080px) and (min-height: 670px) {
  body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .grand-floor-stage {
    justify-content: center !important;
  }
  body[data-casinoir-build] #floor.screen:not(#home).screen--grand-floor .gf-grid {
    flex: 0 0 clamp(300px, 25vw, 395px) !important;
  }
}
