/* Favicon Generator — compiled from assets/scss/main.scss
   sass --watch assets/scss/main.scss:assets/favicon.css --style=expanded */

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
  --bg:            #0e0d0b;
  --surface:       #181713;
  --border:        #2c2920;
  --border-xs:     #201e18;
  --accent:        #c9a227;
  --accent-subtle: rgba(201, 162, 39, 0.09);
  --text:          #ede8df;
  --muted:         #7a7060;
  --dim:           #5c5549;
  --err:           #d95f5f;
  --err-bg:        #2e1a1a;
  --err-border:    #4a2a2a;
  --r-sm:          6px;
  --r-md:          8px;
  --r-lg:          12px;
  --max:           1400px;
  --pad-x:         1.25rem;
}

html.light {
  --bg:            #f5f3ef;
  --surface:       #ffffff;
  --border:        #d4cec4;
  --border-xs:     #e0dbd2;
  --accent:        #b08a18;
  --accent-subtle: rgba(176, 138, 24, 0.09);
  --text:          #1a1814;
  --muted:         #6b6357;
  --dim:           #8c8070;
  --err:           #c0392b;
  --err-bg:        #fde8e8;
  --err-border:    #e8a0a0;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: 'DM Mono', 'Courier New', monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Nav ───────────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 13, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border-xs);
  padding: 0.9rem var(--pad-x);
}

html.light nav {
  background: rgba(245, 243, 239, 0.92);
}

.app-nav {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ── Brand ─────────────────────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.03em;
}

.brand-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 1px;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.06em;
}

.brand-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
}

.theme-toggle {
  background: none;
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.3rem 0.45rem;
  cursor: pointer;
  color: var(--dim);
  font-size: 0.8rem;
  line-height: 1;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--dim); }

/* ── Page layout ───────────────────────────────────────────────────────── */
.page-wrap {
  padding: 1.75rem 1rem 3rem;
}

.page-header {
  margin-bottom: 1.75rem;
}
.page-header h1 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4px;
}
.page-header p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  margin-bottom: 1rem;
}

/* ── Dropzone ──────────────────────────────────────────────────────────── */
#drop-zone {
  border: 1.5px dashed var(--border);
  border-radius: var(--r-md);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg);
}
#drop-zone:hover,
#drop-zone.over {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
#drop-zone .dz-icon {
  font-size: 1.75rem;
  margin-bottom: 0.6rem;
  color: var(--dim);
  display: block;
}
#drop-zone strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text);
}
#drop-zone span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Preview ───────────────────────────────────────────────────────────── */
#preview-area { display: none; }

.preview-grid {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

#preview-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--r-md);
  background: repeating-conic-gradient(var(--border) 0% 25%, var(--surface) 0% 50%) 0 0 / 12px 12px;
  border: 0.5px solid var(--border);
  flex-shrink: 0;
}

.preview-info { flex: 1; }
.preview-info p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.preview-info strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text);
}

.change-btn {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

/* ── Options ───────────────────────────────────────────────────────────── */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0.7rem 0.75rem;
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s;
  user-select: none;
}
.option-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.option-item input[type=checkbox] {
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.option-label strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}
.option-label span {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── Fields ────────────────────────────────────────────────────────────── */
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.field input[type=text] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}
.field input[type=text]:focus {
  outline: none;
  border-color: var(--accent);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
}

.color-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.color-wrap label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}
.color-wrap input[type=color] {
  width: 52px;
  height: 36px;
  padding: 2px;
  cursor: pointer;
  border-radius: var(--r-md);
  border: 0.5px solid var(--border);
  background: var(--bg);
}

/* ── Settings section ──────────────────────────────────────────────────── */
.settings-sep {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 0.5px solid var(--border);
}

.settings-row { margin-bottom: 1rem; }
.settings-row:last-child { margin-bottom: 0; }

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.settings-head strong {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}
.slider-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 20px;
  text-align: right;
}

.settings-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.slider-row span { font-size: 0.72rem; color: var(--muted); }
.slider-row input[type=range] { flex: 1; accent-color: var(--accent); }

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.check-row input[type=checkbox] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.check-row strong {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}
.check-row p {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.4;
}

.bg-color-row {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 0.75rem;
  padding-left: 25px;
}
.bg-color-row label {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.bg-color-row input[type=color] {
  width: 44px;
  height: 32px;
  padding: 2px;
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  cursor: pointer;
}

.swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.1s;
}
.swatch:hover { border-color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 0.8rem 1.4rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.1s, transform 0.1s;
  margin-top: 0.75rem;
}
.btn-primary:hover    { opacity: 0.85; }
.btn-primary:active   { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  padding: 0.8rem 1.1rem;
  background: transparent;
  color: var(--muted);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--dim); color: var(--text); }

.btn-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 0.75rem;
}
.btn-group .btn-primary {
  margin-top: 0;
  flex: 1;
  min-width: 140px;
}

/* ── Progress ──────────────────────────────────────────────────────────── */
#progress-wrap {
  display: none;
  margin-top: 0.75rem;
}

.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s;
  border-radius: 99px;
}

.progress-label {
  font-size: 0.72rem;
  color: var(--dim);
  margin-top: 0.4rem;
  letter-spacing: 0.04em;
}

/* ── Error ─────────────────────────────────────────────────────────────── */
.error-msg {
  background: var(--err-bg);
  border: 0.5px solid var(--err-border);
  color: var(--err);
  border-radius: var(--r-md);
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  margin-top: 0.65rem;
  display: none;
}

/* ── Results ───────────────────────────────────────────────────────────── */
#preview-result { display: none; margin-top: 0.75rem; }

.icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.icon-item { text-align: center; }
.icon-item p {
  font-size: 0.68rem;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1;
}

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
}

/* ── Snippet ───────────────────────────────────────────────────────────── */
#snippet-wrap { display: none; }

.snippet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.snippet-title {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.btn-copy {
  background: transparent;
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.1s, color 0.1s;
}
.btn-copy:hover  { border-color: var(--accent); color: var(--text); }
.btn-copy.copied { border-color: #6bbf72; color: #6bbf72; }

pre#snippet-code {
  background: var(--border-xs);
  color: var(--text);
  border-radius: var(--r-md);
  padding: 1rem;
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  border: 0.5px solid var(--border);
}

/* ── Dark variant zone ─────────────────────────────────────────────────── */
.dark-zone {
  display: none;
  margin-top: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg);
}
.dark-zone:hover,
.dark-zone.over {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.dark-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}
.dark-zone-header strong {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
}

.dark-zone-hint {
  font-size: 0.72rem;
  color: var(--dim);
  line-height: 1.4;
}

.dark-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
}
.dark-preview img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--r-sm);
  border: 0.5px solid var(--border);
  background: repeating-conic-gradient(var(--border) 0% 25%, var(--surface) 0% 50%) 0 0 / 8px 8px;
  flex-shrink: 0;
}

.remove-dark {
  font-size: 0.75rem;
  color: var(--err);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  display: block;
  margin-top: 2px;
}
.remove-dark:hover { text-decoration: underline; }

/* ── Browser tab mockup ────────────────────────────────────────────────── */
.tab-mockup {
  margin: 1.25rem 0 0.5rem;
}

.mockup-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  margin-bottom: 0.5rem;
}

.tab-bar {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md) var(--r-md) 0 0;
  padding: 6px 8px 0;
  height: 36px;
}

.tab-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px 6px 0 0;
  padding: 0 10px;
  height: 28px;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  max-width: 180px;
}

.tab-pill--active {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-bottom: none;
  color: var(--text);
}

.tab-pill--inactive {
  background: var(--border-xs);
  width: 80px;
  opacity: 0.5;
}

.tab-favicon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.tab-title-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-close-btn {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--muted);
  cursor: default;
  margin-left: 4px;
}

/* ── Validator link ─────────────────────────────────────────────────────── */
.validator-link {
  text-align: center;
  padding: 0.5rem 0 1rem;
}

.validator-link a {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 0.5px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.1s, border-color 0.1s;
}

.validator-link a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .options-grid         { grid-template-columns: 1fr; }
  .field-row            { grid-template-columns: 1fr; }
  .btn-group            { flex-direction: column; }
  .btn-group .btn-primary { min-width: unset; }
}
