/* ---------------------------------------------------------------------------
   Google Ads Wizard — demo stylesheet.
   Intentionally small and dependency-free. The CMS will supply its own styling;
   this exists so the proof of concept is legible and demo-able.
   --------------------------------------------------------------------------- */

:root {
    --bg:          #f6f7f9;
    --surface:     #ffffff;
    --border:      #dfe3e8;
    --text:        #1f2933;
    --text-muted:  #647382;
    --accent:      #1a73e8;
    --accent-dark: #1558b8;
    --ok:          #137333;
    --ok-bg:       #e6f4ea;
    --warn:        #b06000;
    --warn-bg:     #fef7e0;
    --error:       #c5221f;
    --error-bg:    #fce8e6;
    --radius:      8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.wrap { max-width: 940px; margin: 0 auto; padding: 0 20px; }

/* --- Header / footer ---------------------------------------------------- */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; }
.brand {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 17px; color: var(--text); text-decoration: none;
}
.brand-mark { color: var(--accent); font-size: 20px; }
.brand-tag {
    margin-left: auto; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
    color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
}

.site-footer {
    margin-top: 48px; padding: 20px 0 40px;
    border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px;
}

main.wrap { padding-top: 28px; padding-bottom: 20px; }

/* --- Typography --------------------------------------------------------- */

h1 { font-size: 26px; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }

.hero { margin-bottom: 26px; }
.lede { font-size: 17px; color: var(--text-muted); max-width: 68ch; margin: 0; }
.hint { color: var(--text-muted); font-size: 13px; margin: 6px 0 0; }
.muted { color: var(--text-muted); }

code {
    background: #eef1f4; border-radius: 4px; padding: 1px 5px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px;
}

/* --- Cards & layout ----------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
}
.card-error { border-color: #f3c2c0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

/* --- Stepper ------------------------------------------------------------ */

.stepper {
    display: flex; gap: 6px; list-style: none;
    margin: 0 0 24px; padding: 0; flex-wrap: wrap;
}
.stepper-item a, .stepper-item > span {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 13px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface);
    font-size: 13px; text-decoration: none; color: var(--text-muted);
}
.stepper-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: #eef1f4; font-size: 12px; font-weight: 600;
}
.stepper-current > span {
    border-color: var(--accent); color: var(--accent); font-weight: 600;
}
.stepper-current .stepper-num { background: var(--accent); color: #fff; }
.stepper-done a { color: var(--text); }
.stepper-done a:hover { border-color: var(--accent); }
.stepper-done .stepper-num { background: var(--ok-bg); color: var(--ok); }

/* --- Flash messages ----------------------------------------------------- */

.flash {
    padding: 12px 16px; border-radius: var(--radius);
    margin-bottom: 16px; font-size: 14px; border: 1px solid transparent;
}
.flash-success { background: var(--ok-bg);    color: var(--ok);    border-color: #b7dfc4; }
.flash-error   { background: var(--error-bg); color: var(--error); border-color: #f3c2c0; }
.flash-info    { background: #e8f0fe;         color: var(--accent-dark); border-color: #c3d7f7; }

/* --- Pills -------------------------------------------------------------- */

.pill {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
}
.pill-ok    { background: var(--ok-bg);   color: var(--ok); }
.pill-warn  { background: var(--warn-bg); color: var(--warn); }
.pill-muted { background: #eef1f4;        color: var(--text-muted); }

/* --- Buttons & forms ---------------------------------------------------- */

.btn {
    display: inline-block; padding: 10px 18px; border-radius: 6px;
    border: 1px solid transparent; font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none; font-family: inherit;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #a9c4ee; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); }
.btn-link {
    background: none; border: none; color: var(--text-muted);
    text-decoration: underline; padding: 10px 6px;
}
.btn-link:hover { color: var(--error); }

.inline-form { display: inline; }

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }

input[type=text], input[type=url], input[type=number], select, textarea {
    width: 100%; padding: 9px 11px; font: inherit; font-size: 14px;
    border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid #c3d7f7; outline-offset: 0; border-color: var(--accent);
}
.field { margin-bottom: 18px; }

.form-actions {
    display: flex; gap: 10px; align-items: center;
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
}
.form-actions .spacer { margin-left: auto; }

/* --- Option lists (presets, accounts, sample pages) ---------------------- */

.option-list { display: grid; gap: 10px; margin: 0 0 4px; }
.option {
    display: flex; gap: 11px; align-items: flex-start;
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 13px 15px; cursor: pointer; background: var(--surface);
}
.option:hover { border-color: var(--accent); }
.option input { margin-top: 3px; flex: none; }
.option-body { flex: 1; }
.option-title { font-weight: 600; font-size: 14px; }
.option-desc { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.option:has(input:checked) { border-color: var(--accent); background: #f5f9ff; }

/* --- Definition list used on the home/status card ----------------------- */

.status-list { margin: 0 0 20px; }
.status-list dt {
    font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-muted); margin-top: 14px;
}
.status-list dt:first-child { margin-top: 0; }
.status-list dd { margin: 4px 0 0; }

.numbered { margin: 0; padding-left: 20px; }
.numbered li { margin-bottom: 7px; font-size: 14px; }

/* --- Ad variant cards (step 4) ------------------------------------------ */

.variant-card { border-left: 3px solid var(--border); }
.variant-selected { border-left-color: var(--accent); background: #fbfdff; }

.variant-head {
    display: flex; align-items: center; gap: 10px;
    font-weight: 400; margin: 0; cursor: pointer;
}
.variant-head input { flex: none; width: 16px; height: 16px; }

.copy-row { position: relative; margin-bottom: 7px; }
.copy-row input { padding-right: 58px; font-size: 13px; }

.char-counter {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    font-size: 11px; color: var(--text-muted); pointer-events: none;
    background: var(--surface); padding-left: 4px;
}
.char-counter.over { color: var(--error); font-weight: 700; }

/* --- Keywords ------------------------------------------------------------ */

.keyword-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.keyword {
    display: inline-flex; align-items: center; gap: 5px;
    background: #eef1f4; border-radius: 4px; padding: 3px 8px; font-size: 12px;
}
.keyword-match {
    font-size: 10px; letter-spacing: .03em; color: var(--text-muted);
    border-left: 1px solid #cfd6dd; padding-left: 5px;
}

/* --- Location chips + autocomplete (step 5) ----------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #e8f0fe; color: var(--accent-dark);
    border-radius: 999px; padding: 5px 8px 5px 12px; font-size: 13px;
}
.chip-static { padding: 5px 12px; }
.chip-remove {
    border: none; background: none; cursor: pointer; font-size: 16px; line-height: 1;
    color: var(--accent-dark); padding: 0 4px;
}
.chip-remove:hover { color: var(--error); }

.geo-results {
    list-style: none; margin: 6px 0 0; padding: 0;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); max-height: 260px; overflow-y: auto;
}
.geo-result {
    display: block; width: 100%; text-align: left; border: none; background: none;
    padding: 9px 13px; font: inherit; font-size: 14px; cursor: pointer;
}
.geo-result:hover { background: #f0f5ff; }
.geo-type { color: var(--text-muted); font-size: 12px; margin-left: 6px; }
.geo-result-empty { padding: 9px 13px; color: var(--text-muted); font-size: 13px; }

/* --- Ad preview (step 6) ------------------------------------------------- */

.ad-preview { padding: 16px 0; border-top: 1px solid var(--border); }
.ad-preview:first-of-type { border-top: none; padding-top: 4px; }
.ad-preview-label {
    font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-muted); margin-bottom: 10px;
}

/* Rough approximation of a search result, for orientation only. */
.serp-mock {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 13px 15px; background: var(--surface); max-width: 620px;
}
.serp-badge {
    display: inline-block; font-size: 11px; font-weight: 700;
    border: 1px solid var(--text); border-radius: 3px; padding: 0 4px; margin-bottom: 5px;
}
.serp-url { font-size: 13px; color: #202124; }
.serp-title { color: #1a0dab; font-size: 19px; line-height: 1.3; margin: 3px 0 4px; }
.serp-desc { font-size: 13px; color: #4d5156; }

/* --- Result page --------------------------------------------------------- */

.resource-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.resource-table th {
    text-align: left; vertical-align: top; padding: 9px 14px 9px 0;
    width: 160px; color: var(--text-muted); font-weight: 600;
}
.resource-table td { padding: 9px 0; border-bottom: 1px solid var(--border); }
.resource-table code { word-break: break-all; }

.api-error {
    border: 1px solid #f3c2c0; background: #fff8f8;
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
}
.api-error-what { font-weight: 700; margin-bottom: 4px; }
.api-error-message { margin-bottom: 6px; }
.api-error-trigger { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.api-error-meta { font-size: 12px; color: var(--text-muted); }

/* --- Error detail ------------------------------------------------------- */

.error-detail { margin: 14px 0; }
.error-detail summary { cursor: pointer; font-size: 13px; color: var(--text-muted); }
.error-detail pre {
    background: #f4f5f7; border: 1px solid var(--border); border-radius: 6px;
    padding: 12px; overflow-x: auto; font-size: 12px; line-height: 1.5;
}
