/* ============================================================
   poster.css — Class Poster Generator Page
   base.css handles: .header, .logo, .back-link, .footer, .footer-link
   ============================================================ */

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ===== Poster Canvas ===== */
.poster-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

#posterCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.poster-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #111;
  color: var(--text-secondary);
  font-size: 14px;
  z-index: 2;
}

.poster-loading i {
  font-size: 28px;
  color: var(--gold);
}

/* ===== Controls Card ===== */
.controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.controls-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.controls-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.control-label i {
  color: var(--gold);
}

/* ===== Number Stepper ===== */
.number-stepper {
  display: flex;
  align-items: stretch;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  height: 50px;
  transition: border-color 0.2s;
}

.number-stepper:focus-within {
  border-color: var(--gold);
}

.step-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  min-width: 48px;
  height: 100%;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.step-btn:hover,
.step-btn:active {
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold);
}

.number-stepper input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
  font-family: inherit;
}

.number-stepper input::-webkit-outer-spin-button,
.number-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* ===== Date Input ===== */
.date-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  padding: 0 14px;
  height: 50px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  display: block;
}

.date-input:focus {
  border-color: var(--gold);
}

/* ===== Fetch status hint ===== */
.fetch-status {
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 14px;
  line-height: 1.3;
}

.fetch-status.success {
  color: var(--success);
}

/* ===== Background row ===== */
.bg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
}

.color-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: background-color 0.3s;
}

.btn-secondary {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 0 14px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.2s, color 0.2s;
  font-family: inherit;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover,
.btn-secondary:active {
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== Checkbox option ===== */
.check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  height: 50px;
}

.check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== Download Button ===== */
.btn-download {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none;
  border-radius: 14px;
  color: #1a0e00;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.3);
}

.btn-download:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-download:active {
  transform: translateY(0);
  opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .container {
    padding: 0 12px 48px;
  }

  .controls-card {
    padding: 16px;
    gap: 16px;
  }

  .controls-row-inline {
    grid-template-columns: 1fr;
  }

  .number-stepper {
    height: 56px;
  }

  .number-stepper input {
    font-size: 26px;
  }

  .step-btn {
    min-width: 56px;
    font-size: 16px;
  }

  .date-input {
    height: 56px;
    font-size: 16px;
  }

  .btn-download {
    height: 60px;
    font-size: 17px;
  }
}
