/**
 * The Alchemist Artists — Interactive Paint-by-Number & Color-Mixing Studio Styles
 * Clean, welcoming art-studio aesthetic for desktop, tablet, mobile, and print.
 */

/* =========================================================================
   1. HOMEPAGE LAUNCHER & STUDIO SECTION WRAPPER
   ========================================================================= */
.pbn-launcher-banner {
  max-width: 1120px;
  margin: 28px auto 36px;
  padding: 0 20px;
}

.pbn-launcher-card {
  background: linear-gradient(135deg, #fffdf9 0%, #f9f3e6 100%);
  border: 2px solid rgba(200, 150, 62, 0.45);
  border-radius: 22px;
  padding: 28px 32px;
  box-shadow: 0 14px 36px rgba(92, 64, 24, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.pbn-launcher-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(200, 150, 62, 0.18);
  color: #7d5218;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.pbn-launcher-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 800;
  color: #2c1e0f;
  margin: 0 0 8px;
}

.pbn-launcher-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: #5a4936;
  margin: 0;
  max-width: 680px;
}

.btn-launch-pbn-studio {
  background: linear-gradient(135deg, #8b5a19 0%, #633d0c 100%);
  color: #fffdf9;
  border: 1.5px solid #d4a44c;
  border-radius: 30px;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(125, 82, 24, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn-launch-pbn-studio:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(125, 82, 24, 0.35);
}

/* =========================================================================
   2. MAIN PAINT-BY-NUMBER STUDIO CONTAINER
   ========================================================================= */
.pbn-studio-section {
  max-width: 1360px;
  margin: 24px auto 48px;
  padding: 0 18px;
}

.pbn-studio-shell {
  background: #fdfaf3;
  border: 1.5px solid rgba(180, 140, 75, 0.4);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(60, 42, 18, 0.12);
  overflow: hidden;
  color: #2e2112;
}

/* Studio Header */
.pbn-studio-header {
  background: linear-gradient(135deg, #2b2116 0%, #3d2e1e 100%);
  color: #f9f3e8;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 2px solid rgba(229, 185, 95, 0.4);
}

.pbn-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 185, 95, 0.2);
  color: #f3ce7a;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.pbn-studio-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #fff9ee;
}

.pbn-studio-header p {
  margin: 0;
  font-size: 13.5px;
  color: #d7cab7;
}

.pbn-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-pbn-action {
  background: rgba(255, 255, 255, 0.1);
  color: #fff8eb;
  border: 1px solid rgba(229, 185, 95, 0.45);
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-pbn-action:hover {
  background: rgba(229, 185, 95, 0.25);
  border-color: #e5b95f;
}

.btn-pbn-action.primary {
  background: linear-gradient(135deg, #e5b95f 0%, #c48f32 100%);
  color: #1f1508;
  border-color: #f5d386;
}

.btn-pbn-action.primary:hover {
  background: linear-gradient(135deg, #efd780 0%, #d49d3d 100%);
}

/* =========================================================================
   3. BEGINNER HOW-IT-WORKS EDUCATIONAL BANNER & BASE PAINT BAR
   ========================================================================= */
.pbn-intro-strip {
  background: #f6efe1;
  border-bottom: 1px solid rgba(180, 140, 75, 0.25);
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.pbn-intro-steps {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #4d3b26;
}

.pbn-intro-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pbn-step-num {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #7d5218;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pbn-base-paints-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pbn-base-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: #fffdf9;
  border: 1px solid rgba(125, 82, 24, 0.22);
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  color: #3d2e1e;
}

.pbn-base-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
  display: inline-block;
}

/* =========================================================================
   4. CONTROLS TOOLBAR (UPLOAD, SAMPLES, COLORS, DETAIL, BACKGROUND, MEDIUM)
   ========================================================================= */
.pbn-controls-bar {
  background: #fffdf9;
  border-bottom: 1px solid rgba(180, 140, 75, 0.25);
  padding: 16px 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 16px;
  align-items: end;
}

.pbn-control-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pbn-control-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6e522c;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pbn-select,
.pbn-upload-label {
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1.5px solid #d6c5aa;
  background: #fff;
  color: #2e2112;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}

.pbn-upload-label {
  background: linear-gradient(135deg, #7d5218 0%, #5c3b0e 100%);
  color: #fff;
  border-color: #5c3b0e;
  font-weight: 700;
}

.pbn-upload-label:hover {
  background: linear-gradient(135deg, #91601e 0%, #6e4712 100%);
}

.pbn-segmented-group {
  display: flex;
  background: #f2eadb;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid #d9cbb4;
}

.pbn-seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #5c4831;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.pbn-seg-btn.active {
  background: #7d5218;
  color: #fff;
  box-shadow: 0 2px 6px rgba(125, 82, 24, 0.25);
}

/* =========================================================================
   5. WORKSPACE SPLIT LAYOUT (LEFT: CANVAS + PALETTE POTS | RIGHT: MIXING PANEL)
   ========================================================================= */
.pbn-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
  gap: 0;
  min-height: 680px;
}

@media (max-width: 1040px) {
  .pbn-workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Canvas Stage + Numbered Paint Pots Palette */
.pbn-stage-column {
  padding: 22px 24px;
  border-right: 1px solid rgba(180, 140, 75, 0.25);
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #f7f2e7;
}

/* View Switcher & Zoom Toolbar */
.pbn-canvas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #fffdf9;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(180, 140, 75, 0.3);
}

.pbn-view-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pbn-view-btn {
  border: 1px solid #d6c5aa;
  background: #fff;
  color: #4d3b26;
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.pbn-view-btn.active {
  background: #7d5218;
  color: #fff;
  border-color: #5c3b0e;
}

.pbn-zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pbn-zoom-btn {
  border: 1px solid #d6c5aa;
  background: #fff;
  color: #3d2e1e;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pbn-zoom-btn:hover {
  background: #f2eadb;
}

/* Canvas Paper Mat Frame (Inspired by clean physical art sheet) */
.pbn-paper-frame {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 28px rgba(45, 32, 16, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  overflow: hidden;
}

.pbn-canvas-scroll-viewport {
  position: relative;
  max-width: 100%;
  max-height: 600px;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border: 1px solid #e6dfd3;
  background: #ffffff;
  cursor: crosshair;
}

.pbn-display-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  transition: transform 0.12s ease;
  transform-origin: center center;
}

/* Quick Toggle Pill Button right under the canvas ("Show numbered" / "Show painted") */
.pbn-quick-toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn-pbn-show-toggle {
  background: #ffffff;
  color: #2c2217;
  border: 2px solid #d96b43;
  border-radius: 30px;
  padding: 9px 26px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(217, 107, 67, 0.15);
  transition: all 0.16s ease;
}

.btn-pbn-show-toggle:hover {
  background: #fff5f0;
  transform: translateY(-1px);
}

.btn-pbn-clear-highlight {
  background: #fff8e7;
  color: #7d5218;
  border: 1.5px solid #c8963e;
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

/* Processing Overlay */
.pbn-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(253, 250, 243, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 25;
}

.pbn-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e6d8c0;
  border-top-color: #7d5218;
  border-radius: 50%;
  animation: pbnSpin 0.8s linear infinite;
}

@keyframes pbnSpin {
  to { transform: rotate(360deg); }
}

/* =========================================================================
   6. INTERACTIVE NUMBERED PAINT POTS PALETTE
   ========================================================================= */
.pbn-palette-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(180, 140, 75, 0.3);
  box-shadow: 0 4px 16px rgba(45, 32, 16, 0.05);
}

.pbn-palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.pbn-palette-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #2e2112;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pbn-palette-hint {
  font-size: 12px;
  color: #6e5b43;
}

/* Paint Pots Grid styled like connected numbered paint pots */
.pbn-pots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 10px 8px;
  align-items: center;
}

.pbn-paint-pot {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid #e2ddd5;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.16), inset 0 2px 4px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  user-select: none;
}

/* Plastic pot hinge tab effect top & bottom */
.pbn-paint-pot::before {
  content: '';
  position: absolute;
  top: -5px;
  width: 14px;
  height: 4px;
  background: #dcd6cc;
  border-radius: 2px;
}

.pbn-paint-pot:hover,
.pbn-paint-pot:focus-visible {
  transform: scale(1.16);
  border-color: #7d5218;
  box-shadow: 0 6px 14px rgba(125, 82, 24, 0.35);
  z-index: 5;
  outline: none;
}

.pbn-paint-pot.active {
  transform: scale(1.18);
  border-color: #d96b43;
  box-shadow: 0 0 0 3px rgba(217, 107, 67, 0.35), 0 6px 14px rgba(0, 0, 0, 0.25);
  z-index: 6;
}

.pbn-pot-num {
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #1c1610;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* =========================================================================
   7. RIGHT COLUMN: INTERACTIVE COLOR-MIXING RECIPE PANEL
   ========================================================================= */
.pbn-mixing-column {
  background: #fffdf9;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pbn-recipe-header-card {
  border-radius: 14px;
  border: 1.5px solid #e3d5be;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(60, 42, 18, 0.06);
}

.pbn-Swatch-hero {
  height: 96px;
  display: flex;
  align-items: stretch;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pbn-swatch-target-half {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pbn-swatch-sim-half {
  width: 115px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-left: 1px dashed rgba(255, 255, 255, 0.45);
  font-size: 10.5px;
  font-weight: 700;
}

.pbn-swatch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  color: #1f160c;
  font-size: 12px;
  font-weight: 800;
  width: fit-content;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.pbn-recipe-title-row {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pbn-recipe-color-title {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  font-weight: 800;
  color: #2b1d0e;
}

.pbn-match-pill {
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(98, 130, 108, 0.15);
  color: #2b5437;
  font-size: 11px;
  font-weight: 800;
}

/* Proportional Visual Recipe Bar */
.pbn-proportion-bar-wrap {
  padding: 0 16px 14px;
}

.pbn-proportion-bar {
  height: 22px;
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  border: 1.5px solid #d5c7b2;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
}

.pbn-prop-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  transition: width 0.25s ease;
}

/* Quantity Mode & Batch Size Toggles */
.pbn-quantity-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #f6efe1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #e2d4bc;
}

/* Recipe Table */
.pbn-recipe-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e3d5be;
}

.pbn-recipe-table th {
  background: #f4ece0;
  color: #5c462b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 9px 12px;
  text-align: left;
}

.pbn-recipe-table td {
  padding: 10px 12px;
  border-top: 1px solid #efe7da;
  font-size: 13px;
  color: #2e2112;
  vertical-align: middle;
}

.pbn-paint-swatch-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.pbn-mini-paint-dot {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

/* Step-by-Step Mixing & Correction Cards */
.pbn-guide-box {
  background: #ffffff;
  border: 1px solid #e3d5be;
  border-radius: 12px;
  padding: 14px 16px;
}

.pbn-guide-box h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #6e4815;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pbn-guide-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #463624;
}

.pbn-correction-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #463624;
}

.pbn-correction-list li {
  padding: 6px 10px;
  background: #faf6ee;
  border-left: 3px solid #c8963e;
  border-radius: 4px;
  line-height: 1.45;
}

/* =========================================================================
   8. DESKTOP HOVER FLOATING PREVIEW CARD
   ========================================================================= */
.pbn-hover-card {
  position: fixed;
  z-index: 9999;
  width: 280px;
  background: #fffdf9;
  border: 1.5px solid #c8963e;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(30, 20, 10, 0.24);
  padding: 12px;
  pointer-events: none;
  display: none;
}

.pbn-hover-swatch {
  height: 44px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 1px solid rgba(0,0,0,0.12);
}
