/*
 * Favicon Generator ([favicon_generator]). Loaded after tools.css; the code
 * boxes reuse its .gg-output styles. The big preview is a 512 px canvas
 * shown at 240 px; the small previews are real-size PNGs from tool-fv.js.
 */

.fv-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.fv-main { position: sticky; top: 96px; }

.fv-stage {
	display: flex; align-items: center; justify-content: center; min-height: 320px; padding: 28px; border-radius: 28px;
	background: #F4F4F7 repeating-conic-gradient(#EDEDF2 0 25%, transparent 0 50%) 0 0 / 20px 20px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); transition: box-shadow .15s;
}
.fv-stage.is-over { box-shadow: inset 0 0 0 3px #7B5CFF; }
.fv-stage canvas { display: block; width: 240px; height: 240px; max-width: 70vw; max-height: 70vw; filter: drop-shadow(0 12px 28px rgba(17, 17, 30, .18)); }

.fv-meter { margin-top: 12px; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; background: #F4F4F7; color: #333; }
.fv-meter:empty { display: none; }
.fv-meter b { font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace; }
.fv-meter.is-good { background: #E7F8EE; color: #14532D; }
.fv-meter.is-ok { background: #FFF6DB; color: #713F12; }
.fv-meter.is-bad { background: #FDE8E8; color: #7F1D1D; }

/* In use: browser tabs (light and dark) and home-screen icons. */
.fv-wild { margin-top: 14px; display: grid; gap: 12px; }
.fv-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fv-tab { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px 12px 4px 4px; font: 500 13px/1 system-ui, -apple-system, sans-serif; }
.fv-tab img { width: 16px; height: 16px; flex-shrink: 0; }
.fv-tab span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-tab i { font-style: normal; opacity: .55; }
.fv-tab-light { background: #FFFFFF; color: #1F1F1F; box-shadow: 0 0 0 1px #E3E3E8, 0 -6px 0 #DEE1E6 inset; }
.fv-tab-dark { background: #35363A; color: #E8EAED; box-shadow: 0 -6px 0 #202124 inset; }
.fv-homes { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding: 14px 16px; border-radius: 18px; background: linear-gradient(160deg, #1E293B, #334155); }
.fv-homes figure { margin: 0; display: grid; justify-items: center; gap: 6px; }
.fv-homes figcaption { font-size: 11.5px; color: #E2E8F0; }
#fv-ios { width: 60px; height: 60px; border-radius: 13.5px; }
#fv-and { width: 52px; height: 52px; }
.fv-px { width: 32px; height: 32px; image-rendering: pixelated; }
#fv-32.fv-px { width: 32px; height: 32px; image-rendering: auto; }
.fv-actions { margin-top: 14px; }

.fv-side { display: grid; gap: 14px; }
.fv-card { background: #fff; border: 1px solid #F0F0F0; border-radius: 24px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }
.fv-card-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6E6E78; margin-bottom: 12px; }
.fv-note { margin: 4px 0 0 !important; font-size: 12.5px; color: #6E6E78; }
#fv-text-opts[hidden], #fv-image-opts[hidden], #fv-bg-opts[hidden], #fv-angle-row[hidden], #fv-add[hidden], #fv-radius-row[hidden], .fv-swatches[hidden] { display: none !important; }

.fv-text { display: grid; gap: 5px; margin: 10px 0; font-size: 13px; font-weight: 600; color: #333; }
.fv-text small { font-weight: 500; color: #8A8A96; margin-left: 4px; }
.fv-text input { width: 100%; font-size: 16px !important; font-weight: 600; border-radius: 12px !important; }
.fv-emojis { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.fv-emoji { width: 34px; height: 34px; padding: 0 !important; margin: 0 !important; border: 1px solid #E8E8EE !important; border-radius: 10px !important; background: #fff !important; font-size: 17px !important; line-height: 1 !important; cursor: pointer; box-shadow: none !important; }
.fv-emoji:hover { border-color: #111 !important; }

.fv-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: #F4F4F7; margin-bottom: 10px; }
.fv-seg button { padding: 8px 4px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; font-size: 13px !important; font-weight: 600 !important; color: #45454F !important; cursor: pointer; box-shadow: none !important; }
.fv-seg button[aria-pressed="true"] { background: #fff !important; color: #111 !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .1) !important; }

.fv-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fv-row input[type="color"] { width: 40px !important; height: 40px !important; padding: 0 !important; border: 0 !important; border-radius: 12px !important; background: none !important; cursor: pointer; flex-shrink: 0; }
.fv-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.fv-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.fv-row input[type="text"] { flex: 1; min-width: 90px; font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace; text-transform: uppercase; }

.fv-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; }
.fv-swatch { aspect-ratio: 1; padding: 0 !important; border: 0 !important; border-radius: 10px !important; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08) !important; transition: transform .12s; }
.fv-swatch:hover { transform: scale(1.08); }

.fv-slider { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.fv-slider label { min-width: 58px; font-size: 13px; font-weight: 600; color: #333; }
.fv-slider input { flex: 1; }
.fv-slider span { min-width: 46px; text-align: right; font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace; font-size: 13px; color: #55555F; }
.fv-field { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; font-size: 13px; font-weight: 600; color: #333; }
.fv-field select { flex: 1; min-width: 0; padding: 8px 30px 8px 12px !important; border-radius: 999px !important; font-size: 13px !important; }

.fv-btn {
	display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px !important; margin: 0 !important;
	border: 1px solid #E2E2E8 !important; border-radius: 999px !important; background: #fff !important; color: #222 !important;
	font-size: 13px !important; font-weight: 600 !important; cursor: pointer; box-shadow: none !important; white-space: nowrap;
}
.fv-btn:hover { border-color: #111 !important; }
.fv-btn:disabled { opacity: .6; cursor: progress; }
.fv-btn-dark { background: #111 !important; border-color: #111 !important; color: #fff !important; }
.fv-btn-dark:hover { background: #333 !important; }
.fv-btn.ok { border-color: #16A34A !important; color: #166534 !important; background: #E7F8EE !important; }
.fv-btn .tg-i { width: 15px; height: 15px; }
.fv-remove { width: 30px; height: 30px; padding: 0 !important; justify-content: center; }

.fv-outputs { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-bottom: 24px; }
.fv-outputs pre { white-space: pre-wrap !important; word-break: break-word; }

@media (max-width: 860px) {
	.fv-layout, .fv-outputs { grid-template-columns: 1fr; }
	.fv-main { position: static; }
	.fv-stage { min-height: 0; padding: 20px; border-radius: 20px; }
	.fv-stage canvas { width: 200px; height: 200px; }
}

/* Dark mode */
html[data-theme="dark"] .tg-tool .fv-stage { background-color: #12121A; background-image: repeating-conic-gradient(#1A1A24 0 25%, transparent 0 50%); }
html[data-theme="dark"] .tg-tool .fv-card { background: #15151D !important; border-color: rgba(255, 255, 255, .09) !important; }
html[data-theme="dark"] .tg-tool .fv-seg { background: #1D1D27 !important; }
html[data-theme="dark"] .tg-tool .fv-seg button { color: #B9B9C6 !important; }
html[data-theme="dark"] .tg-tool .fv-seg button[aria-pressed="true"] { background: #262633 !important; color: #EDEDF2 !important; }
html[data-theme="dark"] .tg-tool .fv-slider label, html[data-theme="dark"] .tg-tool .fv-field, html[data-theme="dark"] .tg-tool .fv-text { color: #EDEDF2 !important; }
html[data-theme="dark"] .tg-tool .fv-slider span, html[data-theme="dark"] .tg-tool .fv-note { color: #9393A3 !important; }
html[data-theme="dark"] .tg-tool .fv-btn, html[data-theme="dark"] .tg-tool .fv-emoji { background: #1D1D27 !important; border-color: rgba(255, 255, 255, .16) !important; color: #EDEDF2 !important; }
html[data-theme="dark"] .tg-tool .fv-btn-dark { background: #EDEDF2 !important; color: #111 !important; }
html[data-theme="dark"] .tg-tool .fv-meter:not(.is-good):not(.is-ok):not(.is-bad) { background: #1D1D27; color: #EDEDF2; }
