:root {
  --bg-color: #0f2027;
  --text-color: #e2e2e2;
  --accent-color: #00d4ff;
  --shadow-color: rgba(0, 0, 0, 0.2);
  --card-blur: 20px;
}
html[data-theme='light'] {
  --bg-color: #f5f7fa;
  --text-color: #4a4a4a;
  --accent-color: #007acc;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --card-blur: 12px;
}
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  margin: 0;
  display: block;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  padding-top: 80px;
  position: relative;
}
.logo {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  background: linear-gradient(to right, var(--accent-color), #6be0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 1px 1px 3px var(--shadow-color);
  margin-bottom: 30px;
  margin-top: 30px;
  animation: fadeInDown 1s ease;
  text-align: center;
}
@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
  .logo {
    font-size: 3.0rem;
    margin-bottom: 18px;
    margin-top: 8px;
  }
}
@media (max-width: 600px) {
  .logo {
    font-size: 2.5rem;
    margin-bottom: 10px;
    margin-top: 4px;
  }
}

/* --- TOP BAR --- */
.top-bar {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 200;
}
.top-bar .mobile-theme-toggle {
  margin: 0;
}
.hamburger-menu {
  margin: 0;
}
.language-dropdown {
  margin: 0;
}

/* --- THEME SWITCH --- */
.mobile-theme-toggle {
  display: flex;
  align-items: center;
}
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}
.theme-toggle .bi {
  font-size: 1.2em;
  color: var(--accent-color);
  opacity: 0.8;
  transition: color 0.3s;
}
.theme-switch {
  width: 44px;
  height: 24px;
  background: rgba(0,212,255,0.18);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  margin: 0 4px;
  transition: background 0.3s;
  border: 2px solid var(--accent-color);
  display: flex;
  align-items: center;
}
.theme-switch-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: left 0.3s, background 0.3s;
  box-shadow: 0 2px 8px var(--shadow-color);
}
.theme-switch[data-checked="true"] {
  background: rgba(0,122,204,0.18);
  border-color: var(--accent-color);
}
.theme-switch[data-checked="true"] .theme-switch-thumb {
  left: 21px;
  background: #007acc;
}
html[data-theme="light"] .theme-toggle .bi-moon {
  color: #aaa;
  opacity: 0.5;
}
html[data-theme="dark"] .theme-toggle .bi-sun {
  color: #aaa;
  opacity: 0.5;
}

/* --- HAMBURGER --- */
.hamburger-menu {
  width: 44px;
  height: 44px;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 100;
}
.hamburger-menu span {
  display: block;
  width: 28px;
  height: 3.5px;
  background: var(--accent-color);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(.4,2,.6,1);
  position: relative;
}
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* --- SPRÅKVAL --- */
.language-dropdown {
  position: relative;
  display: inline-block;
  vertical-align: top;
}
.language-dropdown .dropdown-list {
  display: none;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 36px;
  background: var(--bg-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow-color);
  padding: 4px 0;
  z-index: 10;
  text-align: left;
}
.language-dropdown.open .dropdown-list {
  display: block;
}
.lang-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.18);
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  min-width: 36px;
  min-height: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  transition: transform 0.2s, box-shadow 0.2s;
  outline: none;
}
.lang-flag svg {
  width: 28px;
  height: 20px;
  display: block;
  border-radius: 4px;
  background: transparent;
}
.lang-flag.active {
  filter: drop-shadow(0 0 4px var(--accent-color));
  transform: scale(1.15);
  z-index: 2;
}
.language-dropdown .dropdown-list .lang-flag {
  margin: 2px 4px;
  transform: none;
  filter: none;
  box-shadow: none;
}
.language-dropdown .dropdown-list .lang-flag.active {
  display: none;
}

/* --- MOBILMENY --- */
.mobile-menu-panel {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg-color, #181c20);
  color: var(--text-color, #fff);
  display: none;
  flex-direction: column;
  padding: 48px 0 0 0;
  overflow-y: auto;
  transition: opacity 0.2s;
  box-shadow: 0 0 32px 0 rgba(0,0,0,0.25);
}
.mobile-menu-panel.show {
  display: flex;
}
.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 2.5rem;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}
.mobile-dropdown {
  margin: 32px 0 0 48px;
}
.mobile-dropdown .dropdown-toggle {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  cursor: pointer;
  padding: 0;
  outline: none;
}
.mobile-dropdown .dropdown-menu-custom {
  margin-left: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}
.mobile-dropdown .dropdown-menu-custom a {
  color: var(--text-color, #fff);
  text-decoration: none;
  margin-bottom: 8px;
  font-size: 1rem;
  transition: color 0.15s;
}
.mobile-dropdown .dropdown-menu-custom a:hover {
  color: var(--accent-color, #00d4ff);
}
.mobile-menu-panel .mobile-theme-toggle {
  margin: 32px 0 0 48px;
}

/* --- GLASS CARD --- */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 25px;
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  padding: 35px;
  width: 100%;
  max-width: 700px;
  box-shadow: 0 10px 30px var(--shadow-color);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin: 0 auto 20px auto;
  animation: fadeIn 1.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.search-wrapper {
  position: relative;
}
.search-box,
.search-box:focus {
  width: 100%;
  border-radius: 50px;
  padding: 18px 48px 18px 50px;
  font-size: 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  display: block;
  box-sizing: border-box;
  line-height: 1.2;
  font-family: inherit;
  height: auto;
  min-height: 54px;
  max-height: none;
}
.search-box:focus {
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 15px var(--accent-color);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}
.search-box:-webkit-autofill,
.search-box:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px rgba(255,255,255,0.08) inset !important;
  -webkit-text-fill-color: var(--text-color) !important;
}
.search-box::-webkit-search-clear-button {
  -webkit-appearance: none;
  height: 22px;
  width: 22px;
  background: url('data:image/svg+xml;utf8,<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><circle cx="10" cy="10" r="10" fill="rgba(0,212,255,0.18)"/><path stroke="%2300d4ff" stroke-width="2" stroke-linecap="round" d="M7 7l6 6M13 7l-6 6"/></svg>') no-repeat center center;
  background-size: 22px 22px;
  cursor: pointer;
}
html[data-theme='light'] .search-box::-webkit-search-clear-button {
  background: url('data:image/svg+xml;utf8,<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><circle cx="10" cy="10" r="10" fill="rgba(0,122,204,0.18)"/><path stroke="%23007acc" stroke-width="2" stroke-linecap="round" d="M7 7l6 6M13 7l-6 6"/></svg>') no-repeat center center;
  background-size: 22px 22px;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-color);
  font-size: 1.3rem;
  transition: transform 0.2s ease;
  z-index: 2;
  pointer-events: none;
  line-height: 1;
  margin: 0;
  padding: 0;
}
.voice-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--accent-color);
  cursor: pointer;
  transition: transform 0.2s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: auto;
  margin: 0;
  padding: 0;
}
.voice-btn:hover, .search-icon:hover {
  transform: translateY(-50%) scale(1.2);
}

/* --- SEARCH SUGGESTIONS DROPDOWN --- */
#suggestionsBox {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #181c20 !important;
  box-shadow: 0 4px 16px var(--shadow-color, rgba(0,0,0,0.18));
  border-radius: 12px;
  z-index: 1000;
  margin-top: 4px;
  display: none;
  max-height: 220px;
  overflow-y: auto;
  padding: 0;
}
html[data-theme='light'] #suggestionsBox {
  background: #fff !important;
}
#suggestionsBox ul {
  margin: 0;
  padding: 0;
  list-style: none;
  background: #181c20 !important;
  border-radius: 12px;
}
html[data-theme='light'] #suggestionsBox ul {
  background: #fff !important;
}
.suggestion-item {
  display: flex;
  align-items: center;
  padding: 14px 22px;
  font-size: 1.08rem;
  color: var(--text-color, #fff);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  background: #181c20 !important;
}
html[data-theme='light'] .suggestion-item {
  background: #fff !important;
  color: #222 !important;
}
.suggestion-item:last-child {
  border-bottom: none;
}
.suggestion-item:hover, .suggestion-item.active {
  background: var(--accent-color, #00d4ff) !important;
  color: #fff !important;
}
.suggestion-icon {
  color: var(--accent-color, #00d4ff);
  font-size: 1.1em;
  opacity: 0.8;
  margin-right: 12px;
  flex-shrink: 0;
}
.suggestion-text {
  display: inline-block;
  margin-left: 0;
}
#suggestionsBox,
#suggestionsBox ul,
#suggestionsBox .suggestion-item {
  background: #181c20 !important;
  color: #fff !important;
  opacity: 1 !important;
  filter: none !important;
  z-index: 9999 !important;
}
html[data-theme='light'] #suggestionsBox,
html[data-theme='light'] #suggestionsBox ul,
html[data-theme='light'] #suggestionsBox .suggestion-item {
  background: #fff !important;
  color: #222 !important;
}

/* --- STATUS WIDGETS --- */
.status-widgets-row {
  display: flex;
  gap: 18px;
  margin: 30px 0 10px 0;
  justify-content: center;
  flex-wrap: wrap;
}
.status-widget {
  background: rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 18px 22px 14px 22px;
  min-width: 140px;
  box-shadow: 0 2px 10px var(--shadow-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.2s, background 0.2s;
  border: 1.5px solid rgba(0,212,255,0.10);
  position: relative;
}
.status-widget:hover {
  background: rgba(0,212,255,0.13);
  box-shadow: 0 6px 24px rgba(0,212,255,0.18);
}
.status-widget .service-icon {
  font-size: 2.1rem;
  margin-bottom: 7px;
}
.status-widget .service-name {
  font-weight: 600;
  font-size: 1.08rem;
  margin-bottom: 2px;
  color: var(--accent-color);
  text-align: center;
}
.status-widget .status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}
.status-widget .reports {
  font-size: 0.98rem;
  color: var(--text-color);
  opacity: 0.85;
  margin-top: 2px;
}
.status-explainer {
  max-width: 600px;
  margin: 0 auto 10px auto;
  text-align: center;
  color: var(--text-color);
  opacity: 0.55;
  font-size: 0.70rem;
  background: none;
  border-radius: 10px;
  padding: 8px 0 0 0;
  box-shadow: none;
  line-height: 1.5;
  margin-bottom: 18px;
}

/* --- AI BUBBLE --- */
#aiResponses {
  margin-top: 15px;
  max-width: 700px;
  width: 100%;
}
@keyframes fadeInBubble {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ai-response-bubble {
  position: relative;
  background: rgba(0, 212, 255, 0.15);
  border-radius: 18px;
  padding: 26px 32px 56px 32px;
  color: var(--text-color);
  box-shadow: 0 8px 20px rgba(0, 212, 255, 0.18);
  font-size: 1.13rem;
  opacity: 0;
  animation: fadeInBubble 0.7s forwards;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  word-break: break-word;
  line-height: 1.65;
  letter-spacing: 0.01em;
  max-height: 340px;
  overflow-y: auto;
  border-bottom: 1.5px solid rgba(0,212,255,0.13);
  min-height: 90px;
  transition: box-shadow 0.2s;
}
.ai-response-bubble:hover {
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.22);
}
.ai-response-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.ai-response-header .ai-icon {
  font-size: 1.7rem;
  color: #fff;
  border-radius: 50%;
  width: 2.3rem;
  height: 2.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-response-header .ai-title {
  font-weight: 700;
  font-size: 1.13rem;
  color: var(--accent-color);
  letter-spacing: 0.01em;
}
.ai-response-question {
  font-size: 1.04rem;
  color: #fff;
  background: rgba(0,212,255,0.10);
  border-radius: 10px;
  padding: 7px 14px;
  margin-bottom: 10px;
  font-weight: 500;
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
}
.ai-response-answer {
  margin-bottom: 0;
  font-size: 1.09rem;
  color: var(--text-color);
  font-weight: 400;
  word-break: break-word;
}
.ai-response-answer a {
  color: var(--accent-color);
  text-decoration: underline;
  word-break: break-all;
  transition: color 0.2s;
}
.ai-response-answer a:hover {
  color: #fff;
  text-shadow: 0 2px 8px var(--accent-color);
}
.ai-loader {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-loader .spinner-border {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--accent-color);
}
.ai-response-bubble::-webkit-scrollbar {
  width: 7px;
}
.ai-response-bubble::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 6px;
}
.ai-websearch-link {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 1.01rem;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0.93;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s, text-shadow 0.2s;
  box-shadow: none;
}
.ai-websearch-link:hover {
  color: #fff;
  text-shadow: 0 2px 8px var(--accent-color);
  text-decoration: underline;
}
.ai-websearch-link .bi {
  font-size: 1.15em;
  margin-left: 2px;
  transition: transform 0.2s;
}
.ai-websearch-link:hover .bi {
  transform: translateX(2px) scale(1.12);
}

/* --- FOOTER --- */
.footer {
  margin-top: 30px;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  text-align: center;
}

/* --- RESPONSIVT --- */
@media (max-width: 900px) {
  .top-bar {
    right: 10px;
    gap: 10px;
  }
}
@media (max-width: 600px) {
  .logo {
    font-size: 2.5rem;
    margin-bottom: 10px;
    margin-top: 4px;
  }
  .mobile-menu-panel {
    padding-top: 32px;
  }
  .mobile-dropdown, .mobile-menu-panel .mobile-theme-toggle {
    margin-left: 20px;
  }
  .mobile-menu-close {
    right: 16px;
    top: 16px;
    font-size: 2rem;
  }
  .ai-response-bubble {
    padding: 7px 4px 36px 4px;
  }
  .ai-websearch-link {
    right: 10px;
    bottom: 8px;
    font-size: 0.97rem;
  }
}
@media (max-width: 400px) {
  .ai-response-bubble {
    padding: 4px 2px 28px 2px;
  }
}

.mobile-dropdown .dropdown-menu-custom {
  display: none;
}
.mobile-dropdown.open .dropdown-menu-custom {
  display: flex;
}
.mobile-menu-panel > a {
  color: var(--text-color, #fff);
  text-decoration: none;
  margin: 24px 0 0 48px;
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
  transition: color 0.15s;
}
.mobile-menu-panel > a:hover {
  color: var(--accent-color, #00d4ff);
}
@media (max-width: 600px) {
  .mobile-menu-panel > a {
    margin-left: 20px;
  }
}

/* --- GAMLA SEARCHRESULT (kan tas bort om du bara använder suggestionsBox) --- */
#searchresult {
  display: none;
}
#searchresult ul,
#searchresult li,
#searchresult a,
#searchresult .bi-search {
  display: none !important;
}

/* --- SUGGESTIONSBOX OVERRIDES & MOBILMARGINALER --- */
#suggestionsBox,
#suggestionsBox ul,
#suggestionsBox .suggestion-item {
  background: #181c20 !important;
  color: #fff !important;
  opacity: 1 !important;
  filter: none !important;
  z-index: 9999 !important;
}
html[data-theme='light'] #suggestionsBox,
html[data-theme='light'] #suggestionsBox ul,
html[data-theme='light'] #suggestionsBox .suggestion-item {
  background: #fff !important;
  color: #222 !important;
}
@media (max-width: 800px) {
  .glass-card {
    width: auto;
    max-width: 100%;
    margin-left: 10px;
    margin-right: 10px;
    padding-left: 14px;
    padding-right: 14px;
    box-sizing: border-box;
  }
  .status-explainer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .footer {
    padding-left: 14px;
    padding-right: 14px;
    box-sizing: border-box;
    word-break: break-word;
  }
}

	/* === DARK THEME === */
		body[data-theme="dark"] .dropdown-toggle,
		body[data-theme="dark"] .dropdown-list {
		  background-color: #25343b;
		  color: #eee;
		  border-color: #555;
		}

		body[data-theme="dark"] .dropdown-toggle:hover,
		body[data-theme="dark"] .dropdown-toggle:focus {
		  border-color: #1fb9e0;
		  box-shadow: 0 0 6px #1e90ffaa;
		}

		body[data-theme="dark"] .dropdown-item {
		  color: #eee;
		}

		body[data-theme="dark"] .dropdown-item:hover,
		body[data-theme="dark"] .dropdown-item:focus,
		body[data-theme="dark"] .dropdown-item.selected {
		  background-color: #1e90ff;
		  color: white;
		}

		body[data-theme="dark"] .icon-chevron {
		  fill: #ccc;
		}


		/* === LIGHT THEME === */
		body[data-theme="light"] .dropdown-toggle,
		body[data-theme="light"] .dropdown-list {
		  background-color: #f7f7f7;
		  color: #222;
		  border-color: #ccc;
		}

		body[data-theme="light"] .dropdown-toggle:hover,
		body[data-theme="light"] .dropdown-toggle:focus {
		  border-color: #1e90ff;
		  box-shadow: 0 0 6px #1e90ff66;
		}

		body[data-theme="light"] .dropdown-item {
		  color: #222;
		}

		body[data-theme="light"] .dropdown-item:hover,
		body[data-theme="light"] .dropdown-item:focus,
		body[data-theme="light"] .dropdown-item.selected {
		  background-color: #1e90ff;
		  color: white;
		}

		body[data-theme="light"] .icon-chevron {
		  fill: #444;
		}
			.chrome-icon {
		  width: 24px;
		  height: auto;
		  margin-right: 6px;
		  display: inline-block;
		  vertical-align: middle;
		}
			.header__cta-chrome,
			.header__cta-firefox {
			display: none;
		}
		@media (max-width: 600px) {
		  .chrome-icon {
			width: 18px;
		  }
		}