/* Grid generator page styles. Theme tokens only; the single literal color is the user's
   own picked grid color (applied to the canvas, not via CSS) and the native color input. */

.grid-generator .tool-title {
    margin-bottom: 0.25rem;
}

.grid-generator .tool-intro {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

/* --- Controls ---------------------------------------------------------- */

.gg-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem;
    align-items: end;
}

.gg-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gg-field__label {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Custom width/height pair shares one cell. */
.gg-custom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.75rem;
    align-items: end;
}

.gg-color {
    width: 100%;
    height: 2.5rem;
    padding: 0.2rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
}

.gg-field--check {
    justify-content: center;
}

.gg-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.gg-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--accent);
    cursor: pointer;
}

/* --- Actions ----------------------------------------------------------- */

.gg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* --- Preview ----------------------------------------------------------- */

.gg-preview-wrap {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: auto;
}

.gg-canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 4px;
    display: block;
}
