/* Muuttujat (light) */

:host {
  all: initial;
  display: block;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;

  --primary-color: #c68b19;
  --primary-dark: #ab7915;
  --primary-light: #dda330;
  --primary-rgb: 198, 139, 25;
  --primary-light-rgb: 221, 163, 48;
  --primary-dark-rgb: 171, 121, 21;

  --bg-body: #ffffff;
  --bg-card: #ffffff;
  --bg-header: transparent;
  --text-main: #1a1d24;
  --text-mid: #4a4e58;
  --text-hint: #8e919c;

  --input-bg: #ffffff;
  --input-border: rgba(0,0,0,0.06);
  --input-glow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 10px rgba(0,0,0,0.06);
  --input-glow-focus: 0 8px 36px rgba(var(--primary-rgb),0.18), 0 2px 10px rgba(var(--primary-rgb),0.1);
  --input-text: #1a1d24;
  --input-placeholder: rgba(0,0,0,0.4);

  --fade-base: rgba(255,255,255,1);
  --fade-trans: rgba(255,255,255,0);

  --bubble-bot-bg: #ffffff;
  --bubble-bot-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 4px 14px rgba(0,0,0,0.04);
  --bubble-user-color: #1a1d24;

  --menu-bg: rgba(255,255,255,0.96);
  --menu-shadow: 0 8px 40px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.04);
  --menu-hover: #f3f4f7;

  --nav-bg: transparent;
  --overlay-bg: linear-gradient(135deg, #ffffff 0%, #ffffff 80%, #e6f0fa 100%);
  --overlay-fade-0: rgba(255,255,255,0);
  --overlay-fade-1: rgba(255,255,255,0.6);

  --cta-grad: linear-gradient(145deg, var(--primary-dark), var(--primary-color), var(--primary-light));
  --cta-text: var(--primary-dark);

  --shadow-container: 0 20px 80px rgba(0,0,0,0.07), 0 8px 30px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.03);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.02), 0 4px 16px rgba(0,0,0,0.03);
  --shadow-pill: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
  --shadow-header: none;

  --footer-grad-0: rgba(255,255,255,0);
  --footer-grad-1: rgba(255,255,255,0.80);

  --radius-box: 20px;
  --radius-bubble: 16px;
  --font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
}

/* ── Muuttujat (dark) ── */

:host([data-theme="dark"]) {
  --bg-body: #101014;
  --bg-card: #1a1a20;
  --bg-header: transparent;
  --text-main: #e6e7ec;
  --text-mid: #8e8f98;
  --text-hint: #55565e;

  --input-bg: rgba(30, 32, 42, 0.95);
  --input-border: rgba(255,255,255,0.10);
  --input-glow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 10px rgba(0,0,0,0.2);
  --input-glow-focus: 0 8px 36px rgba(var(--primary-rgb),0.4), 0 2px 10px rgba(var(--primary-rgb),0.2);
  --input-text: #ffffff;
  --input-placeholder: rgba(255,255,255,0.35);

  --fade-base: rgba(16,16,20,1);
  --fade-trans: rgba(16,16,20,0);

  --bubble-bot-bg: #1e1e26;
  --bubble-bot-shadow: 0 2px 4px rgba(0,0,0,0.10), 0 4px 14px rgba(0,0,0,0.08);
  --bubble-user-color: #e6e7ec;

  --menu-bg: rgba(26,26,34,0.96);
  --menu-shadow: 0 8px 40px rgba(0,0,0,0.3);
  --menu-hover: #24242c;

  --nav-bg: transparent;
  --overlay-bg: #131317;
  --overlay-fade-0: rgba(19,19,23,0);
  --overlay-fade-1: rgba(19,19,23,0.5);

  --shadow-container: 0 20px 80px rgba(0,0,0,0.2), 0 8px 30px rgba(0,0,0,0.1);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-pill: 0 4px 16px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.2);
  --shadow-header: none;

  --footer-grad-0: rgba(16,16,20,0);
  --footer-grad-1: rgba(16,16,20,0.75);
}

/* ── Perus ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font-family); }
.tauoton-hidden-init { display: none !important; opacity: 0 !important; }

/* ── Scrollbarien piilotus ── */

.welcome-screen,
.chat-messages,
.contact-view,
#view-booking,
.view-container {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.welcome-screen::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.contact-view::-webkit-scrollbar,
#view-booking::-webkit-scrollbar,
.view-container::-webkit-scrollbar {
  display: none;
}

/* ── Launcher ── */

.chat-launcher {
  position: fixed; bottom: 24px; right: 24px; width: 60px; height: 60px;
  border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 40%, var(--primary-color) 60%, var(--primary-light) 100%);
  background-size: 300% 300%;
  animation: shimmer 6s ease-in-out infinite, heartbeat 5s infinite ease-in-out;
  box-shadow: 0 6px 28px rgba(var(--primary-rgb),0.15), 0 2px 8px rgba(var(--primary-rgb),0.12);
  cursor: pointer; z-index: 2147483647;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.chat-launcher:hover { opacity: 0.9; }
.chat-launcher.is-active { animation: shimmer 6s ease-in-out infinite; }

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes heartbeat {
  0% { transform: scale(1); }
  4.9% { transform: scale(1); }
  5% { transform: scale(1.025); }
  7% { transform: scale(1); }
  9.9% { transform: scale(1); }
  10% { transform: scale(1.06); }
  12% { transform: scale(1); }
  100% { transform: scale(1); }
}

.launcher-icon {
  width: 26px; height: 26px; color: #ffffff;
  transition: opacity 0.2s; position: absolute;
}
.icon-chat { opacity: 1; fill: currentColor; }
.icon-close { opacity: 0; stroke: currentColor; fill: none; }
.chat-launcher.is-active .icon-chat { opacity: 0; }
.chat-launcher.is-active .icon-close { opacity: 1; }

/* ── Nuolinappi ── */

.tauoton-arrow-btn {
  position: fixed; right: 28px; width: 26px; height: 26px; bottom: 92px;
  background: var(--primary-color); border-radius: 50%;
  display: none; justify-content: center; align-items: center;
  cursor: pointer; z-index: 2147483648;
  transition: bottom 0.45s cubic-bezier(0.4,0,0.15,1), transform 0.35s ease, opacity 0.3s ease;
  opacity: 0; box-shadow: 0 2px 10px rgba(var(--primary-rgb),0.15);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.tauoton-arrow-btn:hover { opacity: 0.85 !important; }
.tauoton-arrow-btn.fade-in { opacity: 1; }
.tauoton-arrow-btn.is-open { transform: rotate(180deg); }
.tauoton-arrow-svg { width: 14px; height: 14px; fill: #fff; }

/* ── Prompter ── */

.tauoton-prompter {
  position: fixed; bottom: 106px; right: 20px;
  display: none; flex-direction: column; align-items: flex-end; gap: 16px;
  z-index: 2147483646; opacity: 0; transform: translateY(14px);
  transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.tauoton-prompter.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.tauoton-prompter.hidden-force { display: none !important; }

.prompter-bubble {
  background: #ffffff; border-radius: 16px; border-bottom-right-radius: 4px;
  padding: 14px 18px; border: 0.5px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);
  font-family: var(--font-family); font-size: 14px; font-weight: 400;
  color: #1a1d24; line-height: 1.5; cursor: pointer; transition: opacity 0.2s;
}
.prompter-bubble-title { font-weight: 600; margin-bottom: 8px; }
.prompter-bubble-sub { font-size: 12px; color: #4a4e58; line-height: 1.5; font-weight: 400; }
.prompter-bubble:hover { opacity: 0.85; }

.prompter-chat-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ffffff; border: 0.5px solid rgba(0,0,0,0.06);
  padding: 12px 20px; border-radius: 100px;
  font-family: var(--font-family); font-size: 13px; font-weight: 500;
  color: #1a1d24; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.prompter-chat-btn:hover { opacity: 0.85; }

.prompter-status-dot {
  width: 7px; height: 7px; background: #2ecc71; border-radius: 50%;
  position: relative; flex-shrink: 0;
}
.prompter-status-dot::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 1px solid #2ecc71; opacity: 0; animation: pulse 1.5s infinite ease-out;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.prompter-cta {
  display: flex; align-items: center; gap: 14px;
  background:
    linear-gradient(145deg,
      rgba(var(--primary-dark-rgb), 1),
      rgba(var(--primary-dark-rgb), 0.9),
      rgba(var(--primary-light-rgb), 0.8)),
    var(--cta-bg-prompter, transparent) center/cover no-repeat;
  border-radius: 14px;
  padding: 19px 18px; cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 8px 28px rgba(var(--primary-dark-rgb),0.20), 0 2px 6px rgba(var(--primary-dark-rgb),0.06);
  transition: opacity 0.2s; max-width: 220px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.prompter-cta:hover { opacity: 0.92; }
.prompter-cta::before {
  content: ''; position: absolute; top: -24px; right: -16px;
  width: 80px; height: 80px; background: rgba(255,255,255,0.04); border-radius: 50%;
}
.prompter-cta-text { flex: 1; min-width: 0; }
.prompter-cta-title { font-family: var(--font-family); font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.prompter-cta-desc { font-size: 11px; color: rgba(255,255,255,0.6); line-height: 1.35; }
.prompter-cta-arrow { font-size: 20px; color: rgba(255,255,255,0.35); flex-shrink: 0; transition: transform 0.2s; }
.prompter-cta:hover .prompter-cta-arrow { transform: translateX(3px); }

.prompter-contact-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-color); color: #fff; border: none;
  padding: 12px 20px; border-radius: 100px;
  font-family: var(--font-family); font-size: 13px; font-weight: 400;
  cursor: pointer; transition: opacity 0.2s;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.25);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.prompter-contact-btn:hover { opacity: 0.85; }

/* ── Container ── */

.chat-container {
  position: fixed; bottom: 100px; right: 24px; width: 420px; height: 620px; max-height: 82vh;
  background: var(--bg-body);
  border-radius: var(--radius-box); box-shadow: var(--shadow-container);
  border: 1px solid var(--input-border);
  display: none; flex-direction: column; overflow: hidden; z-index: 2147483647;
  opacity: 0; pointer-events: none; transform: translateY(14px) scale(0.98);
  transition: all 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
.chat-container.active {
  display: flex; opacity: 1; pointer-events: all; transform: translateY(0) scale(1);
}

/* ── Header pill ── */

.header-buttons-pill {
  position: absolute; top: 12px; right: 12px;
  background: var(--bg-card); border-radius: 100px;
  display: flex; align-items: center; gap: 2px;
  padding: 4px 8px; z-index: 30;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);
}

.status-dot {
  width: 8px; height: 8px; background: #2ecc71; border-radius: 50%;
  position: relative; flex-shrink: 0; margin: 0 10px;
}
.status-dot::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 1px solid #2ecc71; opacity: 0; animation: pulse 1.5s infinite ease-out;
}

.header-icon-btn {
  background: transparent; border: none; cursor: pointer;
  padding: 8px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-hint); transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.header-icon-btn:hover { opacity: 0.6; }
.header-icon-btn svg { width: 20px; height: 20px; }

/* ── Logo ── */

.logo-wrapper {
  padding: 24px 24px 16px 0; display: flex;
  align-items: center; justify-content: flex-start; margin-bottom: 32px;
}
.brand-logo { height: 48px; width: auto; display: block; }

/* ── Valikko ── */

.chat-menu {
  position: absolute; top: 64px; right: 18px; width: 220px;
  background: var(--menu-bg); border-radius: 14px;
  box-shadow: var(--menu-shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: none; flex-direction: column; padding: 6px;
  z-index: 100; border: 0.5px solid var(--input-border);
}
.chat-menu.active { display: flex; animation: menuIn 0.2s ease-out; }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-item {
  background: transparent; border: none; width: 100%;
  padding: 10px 12px; box-sizing: border-box; text-align: left;
  font-family: var(--font-family); font-size: 13px; color: var(--text-main);
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; gap: 10px; transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.menu-item:hover { background: var(--menu-hover); }
.menu-item svg { width: 16px; height: 16px; opacity: 0.5; flex-shrink: 0; }

.switch-row { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.switch-label { display: flex; align-items: center; gap: 10px; }
.toggle-switch { position: relative; display: inline-block; width: 34px; height: 20px; pointer-events: none; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #ccc; transition: .3s; border-radius: 20px;
}
.toggle-slider:before {
  position: absolute; content: ""; height: 14px; width: 14px;
  left: 3px; bottom: 3px; background: white; transition: .3s; border-radius: 50%;
}
input:checked + .toggle-slider { background: var(--primary-color); }
input:checked + .toggle-slider:before { transform: translateX(14px); }

/* ── Näkymät ── */

.view-container { flex: 1; position: relative; overflow: hidden; }
.view-section {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.view-section.active { opacity: 1; pointer-events: auto; transform: translateX(0); z-index: 1; }

/* ── Welcome ── */

.welcome-screen { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; }
.welcome-inner { padding: 0 24px 140px; }
.welcome-header { margin-bottom: 32px; }
.welcome-title {
  font-family: var(--font-family); font-size: 24px; font-weight: 400;
  color: var(--text-main); line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.3px;
}
.welcome-subtitle { font-size: 13.5px; color: var(--text-mid); line-height: 1.6; margin: 0; }

.welcome-cta {
  display: flex; align-items: center; gap: 18px;
  background:
    linear-gradient(145deg,
      rgba(var(--primary-dark-rgb), 95),
      rgba(var(--primary-dark-rgb), 0.9),
      rgba(var(--primary-light-rgb), 0.65)),
    var(--cta-bg-welcome, transparent) center/cover no-repeat;
  border-radius: 18px;
  padding: 19px 24px; margin-bottom: 32px;
  cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(var(--primary-dark-rgb),0.16), 0 2px 8px rgba(var(--primary-dark-rgb),0.06);
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.welcome-cta:hover { opacity: 0.92; }
.welcome-cta::before {
  content: ''; position: absolute; top: -40px; right: -20px;
  width: 120px; height: 120px; background: rgba(255,255,255,0.035); border-radius: 50%;
}
.welcome-cta::after {
  content: ''; position: absolute; bottom: -30px; left: 20%;
  width: 80px; height: 80px; background: rgba(255,255,255,0.02); border-radius: 50%;
}
.welcome-cta-content { flex: 1; position: relative; z-index: 1; }
.welcome-cta-title { font-family: var(--font-family); font-size: 17px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.welcome-cta-desc { font-size: 12.5px; color: rgba(255,255,255,0.5); line-height: 1.5; }
.welcome-cta-arrow { font-size: 24px; color: rgba(255,255,255,0.3); flex-shrink: 0; transition: transform 0.2s; position: relative; z-index: 1; }
.welcome-cta:hover .welcome-cta-arrow { transform: translateX(4px); }

.welcome-booking-btn {
  display: inline-flex;
  padding: 10px 32px; 
  border: 0px solid var(--text-main); 
  background: var(--bg-card);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 300;
  border-radius: 100px; 
  cursor: pointer;
  margin-top: -16px; 
  margin-bottom: 16px;
  transition: opacity 0.2s;
}

.welcome-booking-btn:hover {
  opacity: 0.7;
}

/* Tumman tilan tuki */
:host([data-theme="dark"]) .welcome-booking-btn {
  border: 1px solid rgba(255,255,255,0.2);
}

/* ── Quick replies ── */

.qr-section {
  background: var(--bg-card); border-radius: 16px;
  padding: 22px 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
}
.qr-label {
  font-size: 10px; font-weight: 600; color: var(--text-hint);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
}
.qr-list { display: flex; flex-direction: column; }
.qr-btn {
  background: transparent; color: var(--text-main); border: none;
  border-bottom: 0.5px solid var(--input-border);
  padding: 14px 2px; font-family: var(--font-family); font-size: 13px;
  font-weight: 400; line-height: 1.45; cursor: pointer; text-align: left;
  display: flex; justify-content: space-between; align-items: center;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.qr-btn:last-child { border-bottom: none; }
.qr-btn:hover { color: var(--primary-color); }
.qr-arrow { font-size: 14px; color: var(--text-hint); margin-left: 14px; transition: color 0.2s; flex-shrink: 0; }
.qr-btn:hover .qr-arrow { color: var(--primary-color); }

/* ── Chat overlay ── */

.chat-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--overlay-bg); z-index: 5;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22,0.68,0.2,1);
}
.chat-overlay.active { transform: translateY(0); }

.overlay-top-fade {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  padding: 14px 16px 32px;
  background: linear-gradient(to bottom, var(--overlay-fade-1) 0%, var(--overlay-fade-1) 30%, var(--overlay-fade-0) 100%);
  pointer-events: none;
}
.overlay-back-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--bg-card); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mid);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);
  transition: opacity 0.2s; pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.overlay-back-btn:hover { opacity: 0.7; }
.overlay-back-btn svg { width: 20px; height: 20px; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 80px 22px 140px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth; overscroll-behavior-y: contain;
}

/* ── Viestikuplat ── */

.bubble {
  padding: 14px 18px; border-radius: var(--radius-bubble);
  max-width: 89%; font-size: 14px; line-height: 1.65; word-wrap: break-word;
}
.bubble.bot {
  align-self: flex-start; background: var(--bubble-bot-bg); color: var(--text-main);
  border-bottom-left-radius: 4px; box-shadow: var(--bubble-bot-shadow);
}
.bubble.user {
  align-self: flex-end; background: transparent; color: var(--bubble-user-color);
  border-bottom-right-radius: 4px; padding-right: 0; text-align: right;
}
.bubble p { margin: 0 0 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble a { color: inherit; text-decoration: underline; }
.bubble em, .bubble i { font-style: normal; font-weight: 600; }
.bubble.bot h1, .bubble.bot h2, .bubble.bot h3 { margin: 0 0 8px; font-family: var(--font-family); }
.bubble.bot ul, .bubble.bot ol { margin: 8px 0 10px 18px; padding: 0; }
.bubble.bot li { margin: 4px 0; }

/* Typing */
.bubble.typing {
  padding: 14px 18px; background: var(--bubble-bot-bg);
  border-bottom-left-radius: 4px; align-self: flex-start;
  display: flex; align-items: center; gap: 5px;
  width: fit-content; box-shadow: var(--bubble-bot-shadow);
}
.typing-dot {
  width: 5px; height: 5px; background: #bbb; border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce {
  0%,80%,100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Action-napit */
.action-container { align-self: flex-start; margin-top: -4px; margin-bottom: 4px; }
.tauoton-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 100px; border: none;
  font-family: var(--font-family); font-size: 13px; font-weight: 500;
  background: var(--primary-color); color: #fff; cursor: pointer;
  transition: opacity 0.2s; box-shadow: 0 2px 8px rgba(var(--primary-rgb),0.18);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.tauoton-action-btn:hover { opacity: 0.85; }

/* ── Kelluva syöttökenttä ── */

.floating-input {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 40px 16px 14px; z-index: 10;
  background: linear-gradient(to top, var(--fade-base) 0%, var(--fade-base) 40%, var(--fade-trans) 100%);
  pointer-events: none;
}
.floating-input > * { pointer-events: auto; }

.chat-input-form { margin: 0; }
.input-pill {
  display: flex; align-items: center;
  background: var(--input-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 100px; padding: 7px 7px 7px 22px;
  border: 1px solid var(--input-border);
  box-shadow: var(--input-glow);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.input-pill:focus-within {
  border-color: rgba(0,0,0,0.14);
  box-shadow: var(--input-glow);
}
:host([data-theme="dark"]) .input-pill:focus-within { border-color: rgba(255,255,255,0.14); }

.chat-input {
  flex: 1; border: none; background: transparent; padding: 0;
  height: 46px; font-family: var(--font-family); font-size: 16px;
  outline: none; color: var(--input-text);
}
.chat-input::placeholder { color: var(--input-placeholder); font-size: 14px; }

.send-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-main);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.send-btn:hover { opacity: 0.6; transform: rotate(90deg); }
.send-btn svg { width: 20px; height: 20px; }

.return-btn {
  display: none; width: 100%;
  align-items: center; justify-content: center; gap: 8px;
  background: var(--input-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--input-border);
  border-radius: 100px; height: 60px; box-sizing: border-box;
  font-family: var(--font-family); font-size: 14px; font-weight: 500;
  color: var(--input-text); cursor: pointer;
  box-shadow: var(--input-glow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.return-btn:hover {
  border-color: rgba(0,0,0,0.14);
  box-shadow: var(--input-glow);
}
:host([data-theme="dark"]) .return-btn:hover { border-color: rgba(255,255,255,0.14); }
.return-btn svg { width: 16px; height: 16px; }

/* -- Ajanvaraus-välilehden kelluva paluunappi (pallo) -- */
.chat-container.tab-booking .floating-input {
  background: none !important;
}
.chat-container.tab-booking .return-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 0;
  background: var(--bg-card);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.08);
  border: 0.5px solid var(--input-border);
  justify-content: center;
}
.chat-container.tab-booking .return-btn span {
  display: none;
}
.chat-container.tab-booking .return-btn svg {
  width: 22px;
  height: 22px;
  margin: 0;
}

/* ── Navigaatio ── */

.bottom-nav {
  display: grid; grid-template-columns: repeat(3, 1fr);
  flex-shrink: 0; background: transparent; box-shadow: none;
  position: relative;
}
.bottom-nav::before {
  content: '';
  position: absolute; top: -20px; left: 0; right: 0; height: 20px;
  background: linear-gradient(to top, var(--footer-grad-1) 0%, var(--footer-grad-0) 100%);
  pointer-events: none;
}
.nav-item {
  display: flex; align-items: center; justify-content: center;
  padding: 15px 0; border: none; background: transparent;
  cursor: pointer; color: var(--text-hint); transition: color 0.2s;
  font-family: var(--font-family); font-size: 11px; font-weight: 700;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-item:hover { color: #000; opacity: 1; }
:host([data-theme="dark"]) .nav-item:hover { color: #fff; }
.nav-item.active { color: var(--primary-color); }

/* ── Yhteystiedot ja Ajanvaraus ── */

.contact-view { overflow-y: auto; overscroll-behavior-y: contain; background: transparent; }
.contact-inner { padding: 0 24px 300px; }

#view-booking {
  overflow: hidden !important;
  padding: 0;
  box-sizing: border-box;
  background: var(--bg-body);
}
#view-booking iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.contact-header {
  font-size: 16px; font-weight: 500; color: var(--text-mid);
  margin-bottom: 24px; letter-spacing: 0.6px;
  font-family: var(--font-family);
  display: none !important;
}
.contact-rows { display: flex; flex-direction: column; margin-bottom: 24px; }
.contact-row {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--text-main); margin-bottom: 12px;
}
.contact-icon-bubble {
  width: 54px; height: 54px; background: var(--bg-card);
  border: 0.5px solid var(--input-border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06); transition: transform 0.3s, box-shadow 0.3s;
  flex-shrink: 0; color: var(--primary-color);
}
.contact-row:hover .contact-icon-bubble { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.contact-info { font-size: 15px; font-weight: 500; font-family: var(--font-family); }
.contact-form-wrap { width: 100%; height: 300px; border-radius: 12px; }

/* ── Toimipiste-accordion ── */

.contact-header-title {
  font-size: 18px; font-weight: 600; color: var(--text-main);
  margin-bottom: 16px; font-family: var(--font-family);
}

.location-box {
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 10px;
  overflow: hidden;
  border: 0.5px solid var(--input-border);
}

.location-box-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 18px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-family); font-size: 15px; font-weight: 600;
  color: var(--text-main); text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.location-box-header:hover { opacity: 0.8; }

.location-box-icon {
  font-size: 22px; font-weight: 400; color: var(--text-mid);
  transition: transform 0.3s ease;
  line-height: 1; flex-shrink: 0; margin-left: 12px;
  user-select: none;
}
.location-box.open .location-box-icon {
  transform: rotate(45deg);
}

.location-box-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 18px;
}
.location-box.open .location-box-body {
  max-height: 300px;
  padding: 0 18px 16px;
}

.location-detail {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 10px; font-size: 14px; color: var(--text-main);
  font-family: var(--font-family); line-height: 1.5;
}
.location-detail:last-child { margin-bottom: 0; }
.location-detail svg { flex-shrink: 0; margin-top: 2px; color: var(--primary-color); }
.location-detail a {
  color: var(--text-main); text-decoration: none;
  border-bottom: 0.5px dotted var(--text-hint); transition: opacity 0.2s;
}
.location-detail a:hover { opacity: 0.7; }

/* ── Footer ── */

.global-footer {
  padding: 10px 20px 14px; text-align: center; font-size: 9px;
  color: var(--text-hint); line-height: 1.6; flex-shrink: 0;
  background: transparent; box-shadow: none;
  display: flex; flex-direction: column; gap: 3px;
}
.footer-privacy a {
  color: inherit; text-decoration: none;
  border-bottom: 0.5px dotted var(--text-hint); transition: opacity 0.2s;
}
.footer-privacy a:hover { opacity: 0.7; }
.provider-link { color: inherit; text-decoration: none !important; transition: opacity 0.2s; }
.provider-link:hover { opacity: 0.7; }
.brand-highlight { font-weight: 600; color: var(--text-mid); }

/* ── Dark mode overrides ── */

:host([data-theme="dark"]) .overlay-back-btn { border: 1px solid rgba(255,255,255,0.10); }
:host([data-theme="dark"]) .header-buttons-pill { border: 1px solid rgba(255,255,255,0.10); }
:host([data-theme="dark"]) .form-back-top { color: var(--text-mid) !important; }
:host([data-theme="dark"]) .form-slider-sublabel { color: var(--text-mid) !important; }
:host([data-theme="dark"]) .form-slider-unit { color: var(--text-mid) !important; }
:host([data-theme="dark"]) .form-slider-labels { color: var(--text-mid) !important; }

/* ── Liikkeen vähennys ── */

@media (prefers-reduced-motion: reduce) {
  .chat-launcher { animation: none; }
  .chat-container { transition: none; }
  .chat-overlay { transition: none; }
  .view-section { transition: none; }
  .tauoton-prompter { transition: none; }
  .tauoton-arrow-btn { transition: none; }
  .typing-dot { animation: none; opacity: 0.5; }
  .status-dot::after { animation: none; }
  .prompter-status-dot::after { animation: none; }
  .bubble { transition: none; }
  .nav-item { transition: none; }
  .welcome-cta { transition: none; }
  .send-btn { transition: none; }
  @keyframes menuIn { from { opacity: 1; transform: none; } to { opacity: 1; transform: none; } }
}

/* ── Mobiili ── */

@media (max-width: 480px) {
  .chat-container {
    position: fixed !important;
    top: 4px !important; bottom: 4px !important; left: 4px !important; right: 4px !important;
    width: auto !important; height: auto !important; max-height: none !important;
    border-radius: 16px !important; transform: none !important;
  }
  .chat-launcher.is-active { display: none !important; }
  .chat-launcher { right: 16px; bottom: 20px; width: 56px; height: 56px; }
  .chat-input { font-size: 16px; } /* Estää iOS zoom */
  .tauoton-prompter { right: 12px; bottom: 94px; max-width: 240px; }
  .tauoton-arrow-btn { right: 20px; }
  .prompter-bubble { padding: 13px 17px; font-size: 13px; }
  .prompter-chat-btn { padding: 10px 16px; font-size: 13px; }
  .prompter-cta { max-width: 200px; padding: 14px 16px; }
  .prompter-bubble-sub { display: none !important; }
  .prompter-bubble-title { margin-bottom: 0 !important; }
  .welcome-title { font-size: 24px; }
  .tauoton-prompter { gap: 12px; }
  body.tauoton-no-scroll { position: fixed; width: 100%; overflow: hidden; }
}
