/* Floralia — the appraisal page (ประเมิน / ออปชั่น) in the book: look 1 only since 2026-10-17 (the user: "รูปแบบเอา 1 และ
   ปรับแต่ง UI ให้ดูดีกว่านี้"; js/economy.js appraiseView). The pictures are the book kit's own Codex art (assets/ui_book:
   tabs, the gold / dark buttons, the grade slots, the stage frame, per book skin through --uib-*); this file only lays
   them out and adds light and colour. */

/* ---- the mode strip: three equal tabs, the skip-animation switch beside them ---- */
#ui .bookwin .ap-tabs { display: flex; align-items: stretch; justify-content: flex-start; gap: 8px; flex-wrap: nowrap; }
#ui .bookwin .ap-tabs .ap-modes { flex: 1; display: flex; gap: 4px; min-width: 0; }
#ui .bookwin .ap-tabs .ap-modes button { flex: 1 1 auto; padding: 7px 8px !important; font-size: 14px !important; text-align: center; white-space: nowrap; }
#ui .bookwin .ap-tabs .ap-modes em { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font: 700 11px/17px Fredoka, sans-serif; vertical-align: 1px; }
#ui .bookwin .ap-tabs .ap-fast { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px !important; font-size: 13px !important; white-space: nowrap;
  border-image-source: var(--uib-tab_off, url(../assets/ui_book/tab_off.png)) !important; color: #efe6cf; font-weight: 500; }
#ui .bookwin .ap-tabs .ap-fast i { position: relative; flex: none; width: 28px; height: 15px; border-radius: 99px; background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.7); }
#ui .bookwin .ap-tabs .ap-fast i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #8d8473; transition: left 0.15s, background 0.15s; }
#ui .bookwin .ap-tabs .ap-fast.on i::after { left: 15px; background: #ffd95a; box-shadow: 0 0 6px rgba(255, 217, 90, 0.9); }
#ui .bookwin .ap-tabs .ap-fast.on { color: #ffe9a8; }

/* ---- the stage card: the gold stage frame, a glow in the piece's grade colour behind the slot ---- */
#ui .bookwin .ap-work { gap: 10px; }
#ui .bookwin :is(.ap-one, .ap-many) { gap: 12px; padding: 20px 22px 22px; border: 0 solid transparent; border-radius: 0;
  border-image: var(--uib-stage_frame, url(../assets/ui_book/stage_frame.png)) 52 / 20px stretch; }
:root:not([data-booklight]) #ui .bookwin :is(.ap-one, .ap-many) {
  background: radial-gradient(circle at 50% 130px, color-mix(in srgb, var(--gc, #f2d27a) 26%, transparent), transparent 58%), linear-gradient(180deg, rgba(20, 24, 48, 0.92), rgba(10, 11, 22, 0.94)); }
:root[data-booklight] #ui .bookwin :is(.ap-one, .ap-many) {
  background: radial-gradient(circle at 50% 130px, color-mix(in srgb, var(--gc, var(--bk-acc)) 22%, transparent), transparent 58%), color-mix(in srgb, var(--bk-acc) 7%, transparent); }
#ui .bookwin .ap-stage { width: 210px; height: 210px; margin-top: 2px; }
#ui .bookwin .ap-ring { border-color: color-mix(in srgb, var(--gc, #f2d27a) 70%, #f2d27a); box-shadow: inset 0 0 28px color-mix(in srgb, var(--gc, #f2d27a) 22%, transparent), 0 0 22px color-mix(in srgb, var(--gc, #f2d27a) 22%, transparent); }

/* the slot: the book's grade slot picture (the same frames as the bag) */
#ui .bookwin .ap-slot { width: 118px; height: 118px; border: 0; border-radius: 0; box-shadow: none; background: url(../assets/ui_book/slot_g0.png) center / 100% 100% no-repeat;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--gc, #f2d27a) 55%, transparent)); }
#ui .bookwin .ap-slot.g1 { background-image: url(../assets/ui_book/slot_g1.png); }
#ui .bookwin .ap-slot.g2 { background-image: url(../assets/ui_book/slot_g2.png); }
#ui .bookwin .ap-slot.g3 { background-image: url(../assets/ui_book/slot_g3.png); }
#ui .bookwin .ap-slot.g4 { background-image: url(../assets/ui_book/slot_g4.png); }
#ui .bookwin .ap-slot.g5 { background-image: url(../assets/ui_book/slot_g5.png); }
#ui .bookwin .ap-slot img { width: 80px; height: 80px; }
#ui .bookwin .ap-slot b { top: 9px; left: 12px; }
#ui .bookwin .ap-slot .ap-qm { top: 6px; right: 12px; }
#ui .bookwin .ap-slot.empty { opacity: 0.85; filter: none; }
#ui .bookwin .ap-one.none .ap-slot.empty span { color: #9be37b; font-size: 2.6rem; }

/* the name: big, the grade as a chip, the set under it */
#ui .bookwin .ap-name { gap: 4px 8px; }
#ui .bookwin .ap-name b { font: 700 19px 'Mali', sans-serif; }
#ui .bookwin .ap-name small { font-size: 13px; }
#ui .bookwin .ap-grade { padding: 1px 10px; font-size: 12px; background: color-mix(in srgb, var(--gc) 16%, transparent); }

/* the option lines: numbered I-VI, a gold notch on the left, unknown lines dimmed */
#ui .bookwin .ap-lines { max-width: 430px; gap: 5px; counter-reset: apl; }
#ui .bookwin :is(.ap-q, .ap-o) { position: relative; padding: 6px 12px 6px 38px; border-radius: 8px; font-size: 14px;
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--gc, #c9a24a) 75%, transparent), inset 0 0 0 1px rgba(201, 162, 74, 0.25); }
#ui .bookwin :is(.ap-q, .ap-o)::before { counter-increment: apl; content: counter(apl, upper-roman); position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 20px; text-align: center; font: 700 11px Fredoka, sans-serif; color: color-mix(in srgb, var(--gc, #c9a24a) 80%, #fff); opacity: 0.9; }
#ui .bookwin .ap-one.empty .ap-q { padding-left: 12px; justify-content: center; gap: 12px; }
#ui .bookwin .ap-one.empty .ap-q::before { content: none; }
#ui .bookwin .ap-o b { font-size: 15px; }
#ui .bookwin .ap-done { font-size: 15px; }

/* the cost and the buttons: the book's gold button for the main act, the dark one for the others */
#ui .bookwin .ap-cost { font-size: 14px; }
#ui .bookwin .ap-go { min-width: 240px; min-height: 50px; padding: 0 34px; border: 0 solid transparent; border-radius: 0; box-shadow: none; text-shadow: none;
  border-image: var(--uib-btn_gold, url(../assets/ui_book/btn_gold.png)) 24 fill / 10px stretch; background: none; color: #3a2410; font: 700 17px 'Mali', sans-serif; }
#ui .bookwin .ap-go:disabled { filter: saturate(0.35) brightness(0.72); opacity: 0.75; }
#ui .bookwin .ap-go:is(.casting, .skip) { border-image: none; border: 2px solid #2c2533; border-radius: 12px; background: linear-gradient(#8f7be6, #4f3fa6); color: #fff; }
#ui .bookwin .ap-sub { min-height: 34px; padding: 0 16px; border: 0 solid transparent; border-radius: 0; background: none; color: #f4ead0; font: 500 14px 'Mali', sans-serif;
  border-image: var(--uib-btn_dark, url(../assets/ui_book/btn_dark.png)) 24 fill / 10px stretch; }
#ui .bookwin .ap-sub:hover:not(:disabled) { filter: brightness(1.15); }

/* ---- the right page: the list, the pool of the piece in the slot, the lines per grade ---- */
#ui .bookwin .ap-list { gap: 12px; }
#ui .bookwin .ap-list .ap-lhead { padding-bottom: 5px; border-bottom: 1px solid rgba(201, 162, 74, 0.45); font-size: 16px; }
#ui .bookwin .ap-list .ap-lhead small { font-size: 13px; }
#ui .bookwin .ap-note { font-size: 12.5px; }
#ui .bookwin .ap-none { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 12px 22px; text-align: center; border-radius: 10px; background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.3); }
#ui .bookwin .ap-none img { width: 64px; height: 64px; object-fit: contain; opacity: 0.6; margin-bottom: 4px; }
#ui .bookwin .ap-none b { font: 700 16px 'Mali', sans-serif; color: #9be37b; }
#ui .bookwin .ap-none small { font-size: 13px; color: var(--cream-2, #d9cfb8); }
#ui .bookwin :is(.ap-pchips, .ap-gchips) { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
#ui .bookwin .ap-pchips span { padding: 3px 10px; border-radius: 99px; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.5); color: #f3e7c9; font: 600 12.5px 'Mali', sans-serif; }
#ui .bookwin .ap-gchips span { padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--gc) 16%, rgba(0, 0, 0, 0.3)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gc) 70%, transparent); color: var(--gc); font: 600 12.5px 'Mali', sans-serif; }
#ui .bookwin .ap-gchips span b { margin-left: 2px; padding: 0 6px; border-radius: 99px; background: var(--gc); color: #1c1610; font: 700 11px/16px Fredoka, sans-serif; }

/* ---- the light book skins: the same layout in their ink ---- */
:root[data-booklight] #ui .bookwin .ap-tabs .ap-fast { color: var(--bk-acc); }
:root[data-booklight] #ui .bookwin .ap-tabs .ap-fast i { background: color-mix(in srgb, var(--bk-acc) 14%, #fffdf8); box-shadow: inset 0 0 0 1px var(--bk-acc); }
:root[data-booklight] #ui .bookwin .ap-sub { color: #f4ead0; }
:root[data-booklight] #ui .bookwin .ap-name b { color: color-mix(in srgb, var(--gc, var(--bk-acc)) 55%, #2a1d10) !important; }   /* (the grade colour, darkened to read on light paper) */
:root[data-booklight] #ui .bookwin .ap-q { color: color-mix(in srgb, var(--bk-ink) 68%, transparent); }
:root[data-booklight] #ui .bookwin .ap-list .ap-lhead { border-bottom-color: color-mix(in srgb, var(--bk-acc) 45%, transparent); }
:root[data-booklight] #ui .bookwin .ap-none { background: color-mix(in srgb, var(--bk-acc) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bk-acc) 35%, transparent); }
:root[data-booklight] #ui .bookwin .ap-none b { color: #2f7a1b; }
:root[data-booklight] #ui .bookwin .ap-none small { color: var(--bk-ink2); }
:root[data-booklight] #ui .bookwin .ap-pchips span { background: color-mix(in srgb, var(--bk-acc) 9%, #fffdf8); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bk-acc) 45%, transparent); color: var(--bk-ink); }
:root[data-booklight] #ui .bookwin .ap-gchips span { background: color-mix(in srgb, var(--gc) 12%, #fffdf8); color: color-mix(in srgb, var(--gc) 55%, #2a1d10); }
