/* Criador de figurinha WhatsApp */

.sticker-intro {
  margin-bottom: 12px;
  color: var(--dica-body);
}

.sticker-intro strong,
.sticker-intro code {
  color: var(--dica-ink);
}

.sticker-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--dica-border);
  background: var(--dica-surface-soft);
  color: var(--dica-body);
  font-size: 0.92rem;
  line-height: 1.45;
}

.sticker-privacy svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: #128c7e;
  max-width: none;
}

html[data-theme="dark"] .sticker-privacy svg {
  fill: #25d366;
}

.sticker-privacy strong {
  color: var(--dica-ink);
}

.sticker-privacy-short {
  display: none;
}

.sticker-app {
  --st-green: #128c7e;
  --st-green-hover: #0e6f64;
  --st-green-soft: rgba(18, 140, 126, 0.12);
  --st-green-border: rgba(18, 140, 126, 0.38);
  box-shadow: 0 0 0 1px var(--dica-border), 0 12px 32px var(--dica-shadow);
  border-radius: 16px;
  margin-bottom: 28px;
  background: var(--dica-surface);
  color: var(--dica-body);
  overflow: hidden;
}

html[data-theme="dark"] .sticker-app {
  --st-green: #1faa59;
  --st-green-hover: #25d366;
  --st-green-soft: rgba(37, 211, 102, 0.14);
  --st-green-border: rgba(37, 211, 102, 0.42);
}

.sticker-app *,
.sticker-app *::before,
.sticker-app *::after {
  box-sizing: border-box;
}

.sticker-app p {
  margin: 0;
}

.sticker-app button,
.sticker-app input,
.sticker-app select {
  font: inherit;
}

.sticker-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 0;
  align-items: stretch;
}

.sticker-main,
.sticker-side {
  min-width: 0;
  padding: 18px;
}

.sticker-main {
  border-right: 1px solid var(--dica-border);
}

.sticker-side {
  background: var(--dica-surface-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sticker-section-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dica-ink);
}

.sticker-drop {
  border: 2px dashed var(--dica-border);
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--dica-surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sticker-drop:hover,
.sticker-drop.is-dragover {
  border-color: var(--st-green-border);
  background: var(--st-green-soft);
}

.sticker-drop.is-loaded,
.sticker-drop[hidden] {
  display: none;
}

.sticker-check-field {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--st-green-border);
  background: var(--st-green-soft);
}

.sticker-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--dica-ink);
}

.sticker-check input {
  margin-top: 3px;
  flex: none;
  width: 18px;
  height: 18px;
  accent-color: var(--st-green);
}

.sticker-check strong {
  color: var(--dica-ink);
}

.sticker-drop-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--st-green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticker-drop-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--st-green);
}

.sticker-drop-title {
  font-weight: 700;
  color: var(--dica-ink);
  margin-bottom: 4px;
}

.sticker-drop-hint {
  font-size: 0.84rem;
  color: var(--dica-muted);
}

.sticker-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.sticker-crop-help {
  margin: 0 0 10px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--dica-muted);
  text-align: center;
}

.sticker-crop-help strong {
  color: var(--dica-ink);
}

.sticker-canvas-wrap {
  position: relative;
  width: min(100%, 380px);
  margin: 0 auto;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--dica-border), 0 10px 28px rgba(15, 23, 42, 0.12);
  background: #0f172a;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
}

#sticker-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.sticker-crop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.sticker-meta {
  margin-top: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--dica-muted);
  word-break: break-all;
}

.sticker-fields {
  display: grid;
  gap: 12px;
}

.sticker-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sticker-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--dica-ink);
}

.sticker-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.sticker-value {
  font-size: 0.8rem;
  color: var(--dica-muted);
  font-variant-numeric: tabular-nums;
}

.sticker-hint {
  font-size: 0.78rem;
  color: var(--dica-muted);
  line-height: 1.35;
}

.sticker-select,
.sticker-slider {
  width: 100%;
}

.sticker-select {
  border: 1px solid var(--dica-border);
  border-radius: 10px;
  background: var(--dica-surface);
  color: var(--dica-ink);
  padding: 10px 12px;
}

.sticker-slider {
  accent-color: var(--st-green);
}

.sticker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.sticker-app .sticker-btn,
.sticker-app a.sticker-btn {
  appearance: none;
  border: 1px solid var(--dica-border);
  background: var(--dica-surface);
  color: var(--dica-ink) !important;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sticker-app .sticker-btn:hover {
  border-color: var(--st-green-border);
  background: var(--st-green-soft);
}

.sticker-app .sticker-btn-primary {
  background: var(--st-green);
  border-color: var(--st-green);
  color: #fff !important;
}

.sticker-app .sticker-btn-primary:hover {
  background: var(--st-green-hover);
  border-color: var(--st-green-hover);
  color: #fff !important;
}

.sticker-app .sticker-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sticker-status {
  min-height: 1.2em;
  font-size: 0.82rem;
  color: var(--dica-muted);
  line-height: 1.4;
}

.sticker-status.is-ok {
  color: var(--st-green);
  font-weight: 650;
}

.sticker-status.is-error {
  color: #b42318;
  font-weight: 650;
}

html[data-theme="dark"] .sticker-status.is-error {
  color: #f97066;
}

.sticker-result-card {
  background: var(--dica-surface);
  border: 1px solid var(--dica-border);
  border-radius: 14px;
  padding: 14px;
}

.sticker-result-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dica-muted);
  margin-bottom: 8px;
}

.sticker-result-preview {
  display: flex;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #e8ecf1 25%, transparent 25%),
    linear-gradient(-45deg, #e8ecf1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8ecf1 75%),
    linear-gradient(-45deg, transparent 75%, #e8ecf1 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: #fff;
}

.sticker-result-preview img {
  width: 160px;
  height: 160px;
  object-fit: contain;
}

.sticker-result-meta {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--dica-muted);
  text-align: center;
}

.sticker-tips {
  font-size: 0.82rem;
  color: var(--dica-muted);
  line-height: 1.45;
}

.sticker-tips strong {
  color: var(--dica-ink);
}

.sticker-faq details {
  border: 1px solid var(--dica-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--dica-surface);
}

.sticker-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--dica-ink);
}

.sticker-faq details p {
  margin: 10px 0 0;
  line-height: 1.5;
}

@media (max-width: 880px) {
  .sticker-shell {
    grid-template-columns: 1fr;
  }

  .sticker-main {
    border-right: 0;
    border-bottom: 1px solid var(--dica-border);
  }
}

@media (max-width: 520px) {
  .sticker-privacy-full {
    display: none;
  }

  .sticker-privacy-short {
    display: inline;
  }
}
