/* ========================================
   SVG Generator Page Styles
   (Extracted from svg_gen.html inline <style>)
   ======================================== */
:root {
    --ink: #1c2024;
    --paper: #fcfcfd;
    --border: #1c2024;
    --blue: #306bff;
    --blue-hover: #2757e6;
    --warn: #d97706;
    --error: #dc2626;
    --radius: 16px;
    --shadow: 0 2px 0 #000;
    --shadow-lift: 0 6px 0 #000;
    --bg: #f9f9fb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Figtree, system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

.icon-gen-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 20px 72px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.icon-gen-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    align-items: start;
    gap: 40px;
}

@media(max-width:1000px) {
    .icon-gen-grid {
        grid-template-columns: 1fr;
    }
}

.page-title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 48px;
    letter-spacing: -1px;
    margin: 0;
}

.page-sub {
    margin: 6px 0 0;
    font: 400 16px/24px Figtree;
    max-width: 760px;
    opacity: .9;
}

form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

label {
    font: 600 12px/1 Figtree;
    text-transform: uppercase;
    letter-spacing: .4px;
    display: flex;
    gap: 8px;
    align-items: center;
}

textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    padding: 16px;
    border: 1px solid var(--ink);
    border-radius: 16px;
    font: 400 15px/20px Figtree;
    background: #fff;
    box-shadow: var(--shadow);
}

textarea:focus {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.styles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.style-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    background: #fff;
    border: 1px solid var(--ink);
    border-radius: 999px;
    padding: 10px 16px;
    font: 500 14px/18px Figtree;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.style-btn[data-active="true"] {
    background: var(--ink);
    color: var(--paper);
}

.style-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.style-chip {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid var(--ink);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

.style-thumb {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--ink);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

.style-thumb.hidden {
    display: none;
}

/* Inline style icons */
.style-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--ink);
}

.style-btn[data-active="true"] .style-ico {
    background: #0f122a;
    color: #fff;
    border-color: #fff;
}

.style-ico svg {
    width: 18px;
    height: 18px;
}

.inline-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Generate button */
#generateBtn {
    align-self: flex-start;
    background: var(--blue);
    color: var(--paper);
    border: 1px solid var(--ink);
    font: 600 16px/1 Figtree;
    padding: 14px 22px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

#generateBtn:hover:not([disabled]) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    background: var(--blue-hover);
}

#generateBtn[disabled] {
    opacity: .55;
    cursor: progress;
}

.status {
    min-height: 24px;
    font: 500 14px/20px Figtree;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status[data-state="idle"] {
    opacity: .5;
}

.status[data-kind="error"] {
    color: var(--error);
}

.panel {
    background: #fff;
    border: 1px solid var(--ink);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-lift);
}

.panel h2 {
    margin: 0;
    font: 600 18px/1.3 Figtree;
    letter-spacing: -0.5px;
}

.preview-area {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px dashed #b7bcc3;
    border-radius: 12px;
    background: #f1f2f5;
    padding: 12px;
    overflow: hidden;
}

.preview-area[data-loading="true"]:before {
    content: "Generating...";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 500 15px/1 Figtree;
    background: linear-gradient(125deg, #ffffffcc, #f1f2f5cc);
    backdrop-filter: blur(2px);
}

.preview-area svg {
    width: 100%;
    height: 100%;
    max-width: 340px;
    max-height: 340px;
    object-fit: contain;
}

.preview-area img {
    max-width: 340px;
    max-height: 340px;
    width: auto;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dl-btn {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 12px;
    padding: 10px 18px;
    font: 500 14px/1 Figtree;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: .2s;
}

.dl-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.helper-cards {
    display: none;
}

.hidden {
    display: none !important;
}