/*
Theme Name: Autobooking Demo
Theme URI: https://autobooking.fi
Author: Qupio Solutions Oy
Author URI: https://www.qupiosolutions.fi
Description: Qupion järjestelmien demosivusto (autobooking.fi): verkkotilaus, ajanvaraus ja korjaamon ajanvaraus. Kävijä kokeilee asiakkaan ja yrittäjän näkymää. Vaatii Qupio Tilaus & Varaus-, Qupio Ajanvaraus-, Qupio Korjaamo- ja Qupio Demo -lisäosat.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: autobooking
*/

:root {
  --ab-blue: #1F51FF;
  --ab-blue-d: #1238c4;
  --ab-ink: #0f172a;
  --ab-muted: #5b6474;
  --ab-line: #e3e7ef;
  --ab-bg: #f6f8fc;
  --ab-card: #fff;
  --ab-ok: #15803d;
  --ab-radius: 14px;
  --ab-max: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ab-ink); background: var(--ab-bg); }
img { max-width: 100%; height: auto; }
a { color: var(--ab-blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.02em; }
h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.01em; }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }

.ab-wrap { max-width: var(--ab-max); margin: 0 auto; padding: 0 20px; }
.ab-skip { position: absolute; left: -9999px; }
.ab-skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 100; }

/* Yläpalkki */
.ab-demo-bar { background: var(--ab-ink); color: #dbe3f4; font-size: 14px; }
.ab-demo-bar .ab-wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.ab-demo-bar a { color: #fff; }
.ab-header { background: #fff; border-bottom: 1px solid var(--ab-line); position: sticky; top: 0; z-index: 50; }
.ab-header .ab-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.ab-logo { font-weight: 800; font-size: 21px; color: var(--ab-ink); text-decoration: none; letter-spacing: -.02em; }
.ab-logo span { color: var(--ab-blue); }
.ab-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.ab-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ab-ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.ab-nav a:hover, .ab-nav .current-menu-item > a, .ab-nav .current_page_item > a, .ab-nav .current-page-ancestor > a { background: #eef2ff; color: var(--ab-blue); }
.ab-menu-btn { display: none; background: none; border: 1px solid var(--ab-line); border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 860px) {
  .ab-menu-btn { display: block; }
  .ab-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--ab-line); padding: 8px 12px 14px; }
  .ab-nav.is-open { display: block; }
  .ab-nav ul { flex-direction: column; }
}

/* Painikkeet */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 16px; line-height: 1.2; }
.btn-primary { background: var(--ab-blue); color: #fff; }
.btn-primary:hover { background: var(--ab-blue-d); color: #fff; }
.btn-ghost { border-color: var(--ab-blue); color: var(--ab-blue); background: #fff; }
.btn-ghost:hover { background: #eef2ff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* Osiot */
.ab-main { padding-bottom: 60px; }
.ab-hero { background: linear-gradient(160deg, #fff 0%, #eef2ff 100%); border-bottom: 1px solid var(--ab-line); padding: 56px 0 48px; }
.ab-hero p.lead { font-size: 19px; color: var(--ab-muted); max-width: 720px; }
.ab-kicker { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ab-blue); margin-bottom: 10px; }
.ab-section { padding: 48px 0 0; }
.ab-section > .ab-wrap > p.intro { color: var(--ab-muted); max-width: 760px; }
.ab-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ab-card { background: var(--ab-card); border: 1px solid var(--ab-line); border-radius: var(--ab-radius); padding: 24px; display: flex; flex-direction: column; }
.ab-card p { color: var(--ab-muted); }
.ab-card .btn-row { margin-top: auto; padding-top: 8px; }
.ab-card__icon { width: 48px; height: 48px; border-radius: 12px; background: #eef2ff; color: var(--ab-blue); display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; }
.ab-card ul, .ab-check { padding-left: 0; list-style: none; margin: 0 0 16px; }
.ab-card li, .ab-check li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.ab-card li::before, .ab-check li::before { content: "✓"; position: absolute; left: 0; color: var(--ab-ok); font-weight: 800; }
.ab-steps { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; list-style: none; }
.ab-steps li { counter-increment: s; background: #fff; border: 1px solid var(--ab-line); border-radius: var(--ab-radius); padding: 20px 20px 20px 64px; position: relative; }
.ab-steps li::before { content: counter(s); position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--ab-blue); color: #fff; font-weight: 800; display: grid; place-items: center; }
.ab-note { background: #fffbea; border: 1px solid #f5e3a3; border-radius: 12px; padding: 14px 18px; margin: 20px 0; }
.ab-note--info { background: #eef2ff; border-color: #c9d5ff; }
.ab-demo-frame { background: #fff; border: 1px solid var(--ab-line); border-radius: var(--ab-radius); padding: 24px; margin-top: 16px; }
.ab-split { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .ab-split { grid-template-columns: 1fr; } }

/* Ohjeet */
.ab-doc { background: #fff; border: 1px solid var(--ab-line); border-radius: var(--ab-radius); padding: 32px; margin-top: 32px; max-width: 880px; }
.ab-doc h2 { margin-top: 1.6em; font-size: 24px; }
.ab-doc h2:first-child { margin-top: 0; }
.ab-doc h3 { margin-top: 1.3em; }
.ab-doc ol, .ab-doc ul { padding-left: 1.3em; }
.ab-doc li { margin-bottom: 6px; }
.ab-doc code { background: #f1f4f9; border-radius: 5px; padding: 2px 6px; font-size: .92em; }
.ab-doc table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 15px; }
.ab-doc th, .ab-doc td { border: 1px solid var(--ab-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.ab-doc th { background: #f6f8fc; }
.ab-toc { background: #f6f8fc; border-radius: 10px; padding: 14px 18px 14px 36px; }
@media (max-width: 600px) { .ab-doc { padding: 20px; } }
.ab-page-head { padding: 40px 0 0; }
.ab-page-head p { color: var(--ab-muted); max-width: 760px; font-size: 18px; }
.ab-content { max-width: 880px; }

/* Sähköpostit */
.demo-mail { background: #fff; border: 1px solid var(--ab-line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.demo-mail summary { cursor: pointer; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.demo-mail summary span { color: var(--ab-muted); font-size: 14px; }
.demo-mail__frame { width: 100%; height: 640px; border: 0; border-top: 1px solid var(--ab-line); background: #fff; }
.demo-mails__empty { background: #fff; border: 1px dashed #c3cad8; border-radius: 12px; padding: 24px; }

/* Kirjautuminen */
.demo-login { display: grid; gap: 14px; max-width: 380px; }
.demo-login label { display: grid; gap: 6px; font-weight: 600; }
.demo-login input { font: inherit; padding: 11px 12px; border: 1px solid #c3cad8; border-radius: 10px; }
.demo-login input:focus { outline: 2px solid var(--ab-blue); outline-offset: 1px; border-color: var(--ab-blue); }
.demo-login .btn { justify-self: start; }
.demo-login--in { max-width: none; }
.demo-login__err { background: #fdecec; border: 1px solid #f5c2c2; color: #a11d1d; border-radius: 10px; padding: 10px 14px; margin: 0; }
.demo-login__help { color: var(--ab-muted); margin-top: 22px; font-size: 15px; }

/* Alatunniste */
.ab-footer { background: var(--ab-ink); color: #b9c3d6; padding: 40px 0; font-size: 15px; }
.ab-footer a { color: #fff; }
.ab-footer .ab-wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* Etusivun demokortit kuvilla (1.1.0) */
.ab-wrap--wide { max-width: 1440px; }
.ab-grid--demos { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ab-grid--demos h2 { font-size: 20px; margin: 4px 0 8px; }
.ab-grid--demos p, .ab-grid--demos li { font-size: 15px; }
@media (max-width: 1100px) { .ab-grid--demos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ab-card--img { padding: 0 0 22px; overflow: hidden; }
.ab-card--img > :not(img) { margin-left: 22px; margin-right: 22px; }
.ab-card__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 16px; background: #eef2ff; }
.ab-card__tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ab-blue); }
.ab-card--other { background: #f6f8ff; border-style: dashed; }
.ab-demo-frame--pad { padding: 24px 16px; }
@media (max-width: 600px) { .ab-grid--demos { grid-template-columns: 1fr; } }
