/* Säljmodulerna för frisörens och byggfirmans flaggskepp (2 december). Samma uttryck som rosteriets:
   raka ytor, serif i rubriker, mono i etiketter, kontrastfärgen för det man ska göra. Färgerna från --p-* i paletten. */
:root:has(.pp-hero, .hus) {
  --tk-bas: var(--bg); --tk-yta: var(--surface); --tk-jord: var(--ink); --tk-kontrast: var(--accent);
  --tk-mork: color-mix(in oklch, var(--ink) 88%, black); --tk-ease: cubic-bezier(.16,1,.3,1);
  --tk-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
.tk-mono { margin: 0; font-family: var(--tk-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in oklch, currentColor 70%, transparent); }
.tk-knapp { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 3px; background: var(--tk-kontrast); color: #fff; font: 600 15px/1 var(--font-text); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .3s var(--tk-ease), transform .3s var(--tk-ease); }
.tk-knapp svg { width: 17px; height: 17px; transition: transform .4s var(--tk-ease); }
.tk-knapp:hover { background: color-mix(in oklch, var(--tk-kontrast) 84%, black); }
.tk-knapp:hover svg { transform: translateX(3px); }
.tk-knapp-linje { background: transparent; color: var(--tk-kontrast); box-shadow: inset 0 0 0 1px var(--tk-kontrast); }
.tk-knapp-linje:hover { background: var(--tk-kontrast); color: #fff; }
.tk-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; }
.tk-x i { position: absolute; width: 16px; height: 1.5px; background: currentColor; rotate: 45deg; }
.tk-x i + i { rotate: -45deg; }
.tk-x:hover { background: color-mix(in oklch, currentColor 10%, transparent); }
.tk-scrim { position: absolute; inset: 0; background: rgba(30,18,12,.42); opacity: 0; transition: opacity .45s var(--tk-ease); }
:is(.tk-knapp, .tk-modul, .tk-x, .tk-oppna, .tk-tider a):focus-visible { outline: 2px solid var(--tk-kontrast); outline-offset: 3px; }

/* Fast knapp */
.tk-fast { position: fixed; z-index: 60; left: 50%; bottom: 18px; display: flex; align-items: center; gap: 16px; width: min(640px, calc(100% - 32px)); padding: 8px 8px 8px 20px; background: var(--tk-yta); color: var(--tk-jord); border: 1px solid color-mix(in oklch, var(--tk-jord) 14%, transparent); border-radius: 4px; box-shadow: 0 18px 50px -18px rgba(30,18,12,.4); transform: translate(-50%, calc(100% + 40px)); transition: transform .6s var(--tk-ease); }
.tk-fast.on { transform: translate(-50%, 0); }
.tk-fast-txt { flex: 1; min-width: 0; margin: 0; display: grid; font-size: 15px; line-height: 1.35; }
.tk-fast-txt b { font-family: var(--tk-mono); font-weight: 500; font-size: 14px; color: var(--tk-kontrast); }
.tk-fast-txt span { font-family: var(--tk-mono); font-size: 11.5px; color: color-mix(in oklch, var(--tk-jord) 72%, transparent); display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-prick { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #2E8B57; box-shadow: 0 0 0 3px color-mix(in oklch, #2E8B57 20%, transparent); }
.tk-fast-tel { padding: 10px; color: var(--tk-jord); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
html.tk-pa .dock { display: none; }
html.tk-las .tk-fast { transform: translate(-50%, calc(100% + 40px)); }
@media (max-width: 720px) {
  .tk-fast { left: 0; bottom: 0; width: 100%; transform: translateY(110%); border-radius: 0; border-width: 1px 0 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)) 16px; gap: 8px; }
  .tk-fast.on { transform: none; }
  html.tk-las .tk-fast { transform: translateY(110%); }
  .tk-fast-txt { font-size: 13px; }
  .tk-fast .tk-knapp { padding: 0 16px; font-size: 14px; min-height: 46px; }
}

/* Rutan */
.tk-ruta { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.tk-ruta[hidden] { display: none; }
.tk-ruta-kort { position: relative; display: grid; grid-template-columns: 300px 1fr; width: min(760px, 100%); background: var(--tk-yta); color: var(--tk-jord); border-radius: 4px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(30,18,12,.45); opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .5s var(--tk-ease), transform .6s var(--tk-ease); }
.tk-ruta-kort:not(:has(.tk-ruta-bild)) { grid-template-columns: 1fr; width: min(520px, 100%); }
.tk-ruta.on .tk-scrim { opacity: 1; }
.tk-ruta.on .tk-ruta-kort { opacity: 1; transform: none; }
.tk-ruta-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-ruta-copy { display: grid; gap: 14px; align-content: center; padding: 44px 40px 34px; }
.tk-ruta-copy h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 4.2vw, 50px); line-height: .98; letter-spacing: -0.025em; color: var(--tk-jord); }
.tk-ruta-copy > p:not(.tk-mono) { margin: 0; color: color-mix(in oklch, var(--tk-jord) 78%, transparent); }
.tk-tider { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-tider a { min-width: 76px; padding: 11px 14px; border: 1px solid color-mix(in oklch, var(--tk-jord) 22%, transparent); border-radius: 3px; text-align: center; font-family: var(--tk-mono); font-size: 14px; color: var(--tk-jord); text-decoration: none; transition: border-color .3s, background .3s, color .3s; }
.tk-tider a:hover { border-color: var(--tk-kontrast); background: var(--tk-kontrast); color: #fff; }
.tk-form { display: grid; gap: 10px; }
.tk-falt { display: grid; gap: 6px; }
.tk-falt span { font-family: var(--tk-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.tk-falt input { min-height: 48px; padding: 0 14px; border: 1px solid color-mix(in oklch, var(--tk-jord) 28%, transparent); border-radius: 3px; background: #fff; color: var(--tk-jord); font: inherit; font-size: 16px; }
.tk-falt input:focus { outline: 2px solid var(--tk-kontrast); outline-offset: 1px; border-color: transparent; }
.tk-fel { margin: 0; color: #A3302A; font-size: 14px; }
.tk-klart p { margin: 0 0 6px; }
.tk-fin { font-size: 12px; opacity: .7; }
.tk-nej { justify-self: start; padding: 4px 0; border: 0; background: none; color: color-mix(in oklch, var(--tk-jord) 80%, transparent); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 720px) {
  .tk-ruta { place-items: end stretch; padding: 0; }
  .tk-ruta-kort { grid-template-columns: 1fr; width: 100%; border-radius: 8px 8px 0 0; transform: translateY(100%); max-height: 92svh; overflow: auto; }
  .tk-ruta-bild { height: 150px; }
  .tk-ruta-copy { padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); }
  .tk-ruta .tk-x { background: var(--tk-yta); }
}

/* Nästa besök efter bokningen */
.tk-igen { display: grid; gap: 8px; justify-items: start; margin-top: 22px; padding-top: 20px; border-top: 1px solid color-mix(in oklch, var(--tk-jord) 16%, transparent); text-align: left; }
.tk-igen p { margin: 0; }

/* Knappen och panelen */
.tk-oppna { position: fixed; z-index: 61; left: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 6px; border: 0; border-radius: 999px; background: var(--tk-mork); color: var(--tk-bas); font: 500 14px/1 var(--font-text); cursor: pointer; box-shadow: 0 14px 34px -14px rgba(30,18,12,.6); transition: transform .5s var(--tk-ease), bottom .6s var(--tk-ease); }
.tk-oppna:hover { transform: translateY(-2px); }
.tk-oppna-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tk-bas); color: var(--tk-mork); font-family: var(--tk-mono); font-size: 12px; }
@media (min-width: 721px) and (max-width: 1240px) { body:has(.tk-fast.on) .tk-oppna { bottom: 96px; } }
@media (max-width: 720px) {
  .tk-oppna { left: 12px; bottom: 12px; min-height: 40px; font-size: 13px; padding-right: 14px; }
  .tk-oppna-n { width: 28px; height: 28px; }
  body:has(.tk-fast.on) .tk-oppna { bottom: 84px; }
}
.tk-panel { position: fixed; inset: 0; z-index: 130; }
.tk-panel[hidden] { display: none; }
html.tk-las { overflow: hidden; }
.tk-panel-kort { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); display: flex; flex-direction: column; background: var(--tk-mork); color: var(--tk-bas); transform: translateX(100%); transition: transform .6s var(--tk-ease); }
.tk-panel.on .tk-scrim { opacity: 1; }
.tk-panel.on .tk-panel-kort { transform: none; }
.tk-panel header { position: relative; display: grid; gap: 10px; padding: 28px 28px 22px; border-bottom: 1px solid color-mix(in oklch, var(--tk-bas) 14%, transparent); }
.tk-panel header h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: -0.02em; color: var(--tk-bas); }
.tk-panel header p:not(.tk-mono) { margin: 0; color: color-mix(in oklch, var(--tk-bas) 72%, transparent); font-size: 15px; max-width: 34ch; }
.tk-lista { flex: 1; overflow: auto; overscroll-behavior: contain; margin: 0; padding: 6px 0; list-style: none; }
.tk-modul { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; width: 100%; padding: 18px 28px; border: 0; border-bottom: 1px solid color-mix(in oklch, var(--tk-bas) 10%, transparent); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .3s var(--tk-ease); }
.tk-modul:hover { background: color-mix(in oklch, var(--tk-bas) 5%, transparent); }
.tk-n { font-family: var(--tk-mono); font-size: 12px; color: var(--tk-accent-ljus, #C9D6FF); padding-top: 5px; }
.tk-modul-txt { display: grid; gap: 6px; }
.tk-modul-txt b { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.05; color: var(--tk-bas); }
.tk-modul-txt > span { font-size: 14px; line-height: 1.5; color: color-mix(in oklch, var(--tk-bas) 78%, transparent); }
.tk-modul-txt em { font-style: normal; font-size: 14px; line-height: 1.5; color: color-mix(in oklch, var(--tk-bas) 92%, transparent); }
.tk-modul-txt em i { font-style: normal; font-family: var(--tk-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--tk-accent-ljus, #C9D6FF); margin-right: 6px; }
.tk-visa { align-self: start; margin-top: 4px; padding: 6px 10px; border: 1px solid color-mix(in oklch, var(--tk-bas) 28%, transparent); border-radius: 3px; font-family: var(--tk-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; transition: background .3s, color .3s; }
.tk-modul:hover .tk-visa { background: var(--tk-bas); color: var(--tk-mork); }
.tk-panel footer { padding: 18px 28px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid color-mix(in oklch, var(--tk-bas) 14%, transparent); }
.tk-boka { color: var(--tk-accent-ljus, #C9D6FF); font-size: 14px; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .tk-panel-kort { top: auto; left: 0; width: 100%; max-height: 88svh; border-radius: 10px 10px 0 0; transform: translateY(100%); }
  .tk-panel header { padding: 22px 20px 18px; }
  .tk-panel header h2 { font-size: 34px; }
  .tk-modul { grid-template-columns: 28px 1fr; padding: 16px 20px; }
  .tk-visa { grid-column: 2; justify-self: start; margin-top: 0; }
}
.tk-fokus { outline: 2px solid var(--tk-kontrast) !important; outline-offset: 8px; animation: tk-puls 2.4s var(--tk-ease) both; }
@keyframes tk-puls { 0% { outline-color: transparent; outline-offset: 20px; } 25% { outline-color: var(--tk-kontrast); outline-offset: 8px; } 80% { outline-color: var(--tk-kontrast); } 100% { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .tk-ruta-kort, .tk-panel-kort, .tk-fast, .tk-scrim { transition: none; }
  .tk-fokus { animation: none; }
}
