/* bg_guide.css -- 2026-09-28: black-background notice, Do / Don't, Copy Prompt (landing + Studio). See bg_guide.js. */

/* ---------- Studio: hard notice under the upload box ---------- */
.bg-notice {
  margin: 12px 0 0;
  padding: 12px 13px 12px 14px;
  border: 1.5px solid #B8412A;
  border-left-width: 5px;
  border-radius: 12px;
  background: #FFF4EF;
  color: #2A1712;
  font-size: 12.5px;
  line-height: 1.45;
}
.gen-controls-card .bg-notice { margin: 0; }
.bg-notice.good { border-color: #2F7A55; background: #F1FAF4; }
.bg-notice-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px; letter-spacing: .01em; text-transform: uppercase; color: #9A2F1A;
}
.bg-notice.good .bg-notice-title { color: #22603F; }
.bg-notice-title svg { flex: none; }
.bg-notice p { margin: 6px 0 0; }
.bg-notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bg-notice-hint { margin-top: 8px; font-size: 11.5px; color: #5A4038; }
.bg-check { margin-top: 9px; padding: 7px 9px; border-radius: 8px; font-size: 12px; }
.bg-check.good { background: #E3F4EA; color: #1D5A3A; }
.bg-check.bad { background: #FBE0D6; color: #8A2612; }

body[data-theme="dark"] .bg-notice { background: #2A1A15; color: #F4E4DD; border-color: #D2644A; }
body[data-theme="dark"] .bg-notice.good { background: #14261D; border-color: #4FA77A; }
body[data-theme="dark"] .bg-notice-title { color: #FF9C82; }
body[data-theme="dark"] .bg-notice.good .bg-notice-title { color: #86D6AA; }
body[data-theme="dark"] .bg-notice-hint { color: #D9BFB5; }
body[data-theme="dark"] .bg-check.good { background: #173526; color: #A7E6C3; }
body[data-theme="dark"] .bg-check.bad { background: #4A2016; color: #FFC9B8; }

/* ---------- buttons ---------- */
.bg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 14px; border-radius: 10px; border: 1.5px solid transparent;
  font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; line-height: 1.1;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.bg-btn:active { transform: translateY(1px); }
.bg-btn:disabled { opacity: .6; cursor: wait; }
.bg-btn-copy { background: #9C4B30; color: #fff; }
.bg-btn-copy:hover { background: #843C25; }
.bg-btn-copy.copied { background: #2F7A55; }
.bg-btn-dark { background: #16201E; color: #fff; }
.bg-btn-dark:hover { background: #0B1210; }
.bg-btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .85; }
.bg-btn-ghost:hover { opacity: 1; }
.bg-btn-link { background: none; border: none; padding: 9px 4px; color: #9C4B30; text-decoration: underline; font-weight: 800; }
body[data-theme="dark"] .bg-btn-link { color: #FF9C82; }

/* ---------- landing section ---------- */
.bg-section { margin-bottom: 70px; }
.bg-section-card {
  border: 2px solid #B8412A; border-radius: 22px; background: #FFF6F1; padding: 28px 30px;
  box-shadow: 0 18px 40px rgba(16, 23, 22, .06);
}
.bg-section-alert {
  display: flex; align-items: flex-start; gap: 14px; padding-bottom: 18px; margin-bottom: 20px;
  border-bottom: 1px solid rgba(184, 65, 42, .25);
}
.bg-section-alert strong { display: block; font-size: 19px; color: #8E2A16; margin-bottom: 4px; }
.bg-section-alert p { margin: 0; color: #3A2A25; font-size: 15px; line-height: 1.55; }
.bg-section-alert svg { flex: none; margin-top: 2px; color: #B8412A; }
.bg-section-fix { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(184, 65, 42, .25); }
.bg-section-fix .bg-steps { flex: 1 1 420px; margin: 0; }
.bg-section-fix .bg-btn { padding: 13px 20px; font-size: 14px; }

/* ---------- Do / Don't lists ---------- */
.bg-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bg-list { border-radius: 14px; padding: 14px 16px; }
.bg-list.do { background: #EEF8F2; border: 1.5px solid #9FD0B3; }
.bg-list.dont { background: #FDEEE8; border: 1.5px solid #EDB3A1; }
.bg-list-head { font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.bg-list.do .bg-list-head { color: #22603F; }
.bg-list.dont .bg-list-head { color: #9A2F1A; }
.bg-list ul { margin: 0; padding: 0; list-style: none; }
.bg-list li { position: relative; padding-left: 22px; margin: 7px 0; font-size: 14px; line-height: 1.45; color: #22302C; }
.bg-list.do li::before, .bg-list.dont li::before {
  position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%;
  font-size: 11px; font-weight: 900; line-height: 16px; text-align: center; color: #fff;
}
.bg-list.do li::before { content: "\2713"; background: #2F7A55; }
.bg-list.dont li::before { content: "\2715"; background: #B8412A; }
.bg-steps { margin: 6px 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.55; color: #22302C; }
.bg-steps li { margin: 3px 0; }

/* ---------- dialog ---------- */
.bg-modal-back {
  position: fixed; inset: 0; z-index: 10050; background: rgba(10, 14, 13, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.bg-modal {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto;
  background: #fff; color: #16201E; border-radius: 18px; padding: 22px 22px 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35); font-size: 14px; line-height: 1.5;
}
.bg-modal.wide { max-width: 760px; }
.bg-modal.warn { border-top: 6px solid #B8412A; }
.bg-modal-x {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: none; border-radius: 50%;
  background: #F1EFEA; color: #16201E; font-size: 20px; line-height: 1; cursor: pointer;
}
.bg-modal-title { margin: 0 34px 10px 0; font-size: 19px; font-weight: 800; }
.bg-modal.warn .bg-modal-title { color: #9A2F1A; }
.bg-modal-lead { margin: 0 0 14px; }
.bg-modal-fix { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #F6F3EE; }
.bg-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------- toast ---------- */
.bg-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 10060; transform: translate(-50%, 20px);
  max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px;
  background: #16201E; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.4;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.bg-toast.show { opacity: 1; transform: translate(-50%, 0); }
.bg-toast.bad { background: #8A2612; }

@media (max-width: 720px) {
  .bg-lists { grid-template-columns: 1fr; }
  .bg-section-card { padding: 20px 16px; }
}

/* ---------- Studio: "Remove Background" switch (2026-09-28, shown after an upload, OFF by default) ---------- */
.bgr-wrap { width: 100%; box-sizing: border-box; margin: 2px 0; }
.bgr-wrap[hidden] { display: none !important; }
.bgr-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; box-sizing: border-box;
  border-radius: 14px; border: 2px solid #C4D2C9; background: #FFFFFF; cursor: pointer; text-align: left;
  box-shadow: 0 3px 8px rgba(22, 32, 30, 0.04); transition: all .2s cubic-bezier(0.16, 1, 0.3, 1); font: inherit; color: inherit;
}
.bgr-toggle:hover { border-color: #2F7A55; box-shadow: 0 6px 16px rgba(47, 122, 85, 0.14); }
.bgr-toggle:focus-visible { outline: 3px solid rgba(47, 122, 85, .35); outline-offset: 2px; }
.bgr-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center;
  background: #F0F5F2; color: #2D413A; border: 1px solid #D2DFD7; transition: all .2s;
}
.bgr-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bgr-title-row { display: flex; align-items: center; gap: 6px; }
.bgr-title { font-size: 13.5px; font-weight: 800; color: #101716; font-family: var(--font-display, inherit); }
.bgr-badge {
  font-family: var(--font-mono, monospace); font-size: 9.5px; font-weight: 800; padding: 1px 6px; border-radius: 999px;
  background: #E8EFEA; color: #213B32; border: 1px solid #C6D6CB; letter-spacing: .04em;
}
.bgr-desc { font-size: 10.5px; font-weight: 600; color: #4D5E58; line-height: 1.35; }
.bgr-switch {
  width: 44px; height: 24px; flex: none; position: relative; border-radius: 999px;
  background: #DCE4DE; border: 1.5px solid #C4D2C9; transition: all .2s; box-sizing: border-box;
}
.bgr-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; position: absolute; top: 1.5px; left: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: all .2s;
}
.bgr-toggle.active { background: #F1FAF4; border-color: #2F7A55; }
.bgr-toggle.active .bgr-icon { background: #DDF1E5; border-color: #A9D5BC; color: #22603F; }
.bgr-toggle.active .bgr-badge { background: #2F7A55; color: #FFFFFF; border-color: #2F7A55; }
.bgr-toggle.active .bgr-switch { background: #2F7A55; border-color: #22603F; }
.bgr-toggle.active .bgr-thumb { transform: translateX(18px); }

body[data-theme="dark"] .bgr-toggle { background: #16201E; border-color: #34463F; }
body[data-theme="dark"] .bgr-title { color: #EEF4F1; }
body[data-theme="dark"] .bgr-desc { color: #A9BBB4; }
body[data-theme="dark"] .bgr-icon { background: #1E2B28; border-color: #34463F; color: #CFE0D8; }
body[data-theme="dark"] .bgr-badge { background: #1E2B28; color: #CFE0D8; border-color: #34463F; }
body[data-theme="dark"] .bgr-switch { background: #2A3834; border-color: #3C4F48; }
body[data-theme="dark"] .bgr-toggle.active { background: #14261D; border-color: #4FA77A; }
body[data-theme="dark"] .bgr-toggle.active .bgr-icon { background: #1C3A2A; border-color: #4FA77A; color: #86D6AA; }
body[data-theme="dark"] .bgr-toggle.active .bgr-badge,
body[data-theme="dark"] .bgr-toggle.active .bgr-switch { background: #3E9A6B; border-color: #4FA77A; color: #fff; }

/* warning dialog: "Remove Background & Generate" */
.bg-btn-green { background: #2F7A55; color: #fff; }
.bg-btn-green:hover { background: #22603F; }
