/* generate.css — styles specific to the generator tool page
   Loaded after style.css which provides all base styles, nav, and variables */

/* --- PAGE LAYOUT --- */
.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.page-title {
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: .5rem;
}

.page-title span { color: var(--accent); }

.page-sub {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.page-sub a { color: var(--accent); }

/* --- URL INPUT ROW --- */
.input-row { display: flex; gap: 8px; margin-bottom: .75rem; }

.url-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    padding: 11px 14px;
    outline: none;
    transition: border-color .15s;
}

.url-input:focus { border-color: var(--accent); }
.url-input::placeholder { color: var(--muted); }

.btn--xs { font-size: 11px !important; padding: 6px 12px !important; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* --- EXAMPLE QUICK-FILL --- */
.hint   { font-size: 12px; color: var(--muted); margin-bottom: 1.25rem; }
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 2rem; }
.ex-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }

.ex-btn {
    font-size: 11px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--muted);
    font-family: var(--mono);
    padding: 4px 10px;
    cursor: pointer;
    transition: all .15s;
}

.ex-btn:hover { border-color: var(--accent); color: var(--accent); }

/* --- STATUS / SPINNER --- */
.status {
    display: none;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 1rem;
    font-size: 12px;
    font-family: var(--mono);
}

.status.on { display: flex; }

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.status-txt { color: var(--muted); }

/* --- ERROR --- */
.error {
    display: none;
    background: rgba(248,113,113,.08);
    border: 1px solid rgba(248,113,113,.3);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--red);
    font-size: 12px;
    font-family: var(--mono);
    margin-bottom: 1rem;
}

.error.on { display: block; }

/* --- MISTRAL WARNING --- */
.warning {
    display: none;
    background: rgba(251,191,36,.08);
    border: 1px solid rgba(251,191,36,.35);
    border-radius: 8px;
    padding: 12px 14px;
    color: #f59e0b;
    font-size: 12px;
    font-family: var(--mono);
    margin-bottom: 1rem;
}

.warning.on { display: block; }

[data-theme="light"] .warning {
    background: rgba(217,119,6,.08);
    border-color: rgba(217,119,6,.3);
    color: #b45309;
}

/* --- STATS GRID --- */
.stats {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 1rem;
}

.stats.on { display: grid; }

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
}

.stat-lbl {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
    font-family: var(--mono);
}

.stat-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--mono);
}

.stat-unit { font-size: 10px; color: var(--muted); margin-left: 2px; }

/* --- RESULT PANEL --- */
.result {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.result.on { display: block; }

.result-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.result-meta   { display: flex; align-items: center; gap: 10px; }
.result-file   { font-size: 12px; font-weight: 700; font-family: var(--mono); }
.result-info   { font-size: 11px; color: var(--green); font-family: var(--mono); }
.result-actions { display: flex; gap: 6px; }

.copy-ok {
    font-size: 10px;
    color: var(--green);
    opacity: 0;
    transition: opacity .3s;
    font-family: var(--mono);
}

.copy-ok.on { opacity: 1; }

.code {
    padding: 16px;
    overflow-x: auto;
    max-height: 480px;
    overflow-y: auto;
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.7;
    white-space: pre;
}

/* JSON syntax colours */
.jk { color: #79c0ff; }
.js { color: #a5d6ff; }
.jn { color: #f2cc60; }
.jb { color: #ff7b72; }

/* --- HOW TO USE --- */
.howto {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.howto h2 {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.steps    { display: grid; gap: 10px; }
.step     { display: flex; gap: 14px; align-items: flex-start; }

.step-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
    width: 20px;
    flex-shrink: 0;
    padding-top: 1px;
}

.step-body              { font-size: 13px; color: var(--muted); line-height: 1.6; }
.step-body code         { color: var(--accent); font-family: var(--mono); font-size: 12px; }
.step-body strong       { color: var(--text); font-weight: 500; }
