/* ============================================================
   GLOBALT – APP-STIL
   ============================================================ */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a; /* mørkere, mer app-aktig */
  color: #e5e7eb;
  margin: 0;
  padding: 1rem;
}

.app-wrapper {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


/* ============================================================
   VERKTØYMENY – KOMPAKT, APP-AKTIG
   ============================================================ */

.tools-header {
  max-width: 800px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  background: #1e293b;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(255,255,255,0.05);
}

.tools-title {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
}

.tools-nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tools-link {
  padding: 0.45rem 0.9rem;
  border-radius: 0.6rem;
  background: #0f172a;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid #334155;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.tools-link:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #f9fafb;
  box-shadow: 0 0 8px rgba(37,99,235,0.5);
}

.tools-link.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #f9fafb;
}


/* ============================================================
   KALKULATOR-KORT
   ============================================================ */

.calc-container {
  max-width: 800px;
  margin: 0 auto;
  background: #1e293b;
  padding: 1.8rem;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.04);
}


/* ============================================================
   SKJEMA-ELEMENTER – APP-STIL
   ============================================================ */

label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
}

input:focus,
select:focus {
  border-color: #3b82f6;
  background: #1e293b;
  outline: none;
}


/* ============================================================
   KNAPPER – APP-STIL
   ============================================================ */

button {
  margin-top: 1.4rem;
  padding: 0.9rem 1.2rem;
  border-radius: 0.75rem;
  border: none;
  background: #3b82f6;
  color: white;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-size: 1.05rem;
  box-shadow: 0 3px 10px rgba(59,130,246,0.35);
  transition: background 0.2s, box-shadow 0.2s;
}

button:hover {
  background: #2563eb;
  box-shadow: 0 4px 14px rgba(37,99,235,0.45);
}


/* ============================================================
   RESULTATBOKSER
   ============================================================ */

.result,
.recommendation {
  margin-top: 20px;
  padding: 15px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.75rem;
}

.good { color: #10b981; font-weight: bold; }
.bad { color: #ef4444; font-weight: bold; }
.neutral { color: #60a5fa; font-weight: bold; }


/* ============================================================
   GRID
   ============================================================ */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   TOGGLE-SWITCHER – ELEGANT APP-STIL
   ============================================================ */

.coffee-row,
.cooler-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.2rem;
  position: relative;
}

.coffee-row input[type="checkbox"],
.cooler-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle {
  position: relative;
  width: 50px;
  height: 28px;
  background: #334155;
  border-radius: 999px;
  border: 1px solid #475569;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f1f5f9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  transition: transform 0.25s ease, background 0.25s ease;
}

.coffee-row input[type="checkbox"]:checked + .toggle,
.cooler-row input[type="checkbox"]:checked + .toggle {
  background: #059669;
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16,185,129,0.6);
}

.coffee-row input[type="checkbox"]:checked + .toggle::before,
.cooler-row input[type="checkbox"]:checked + .toggle::before {
  transform: translateX(22px);
  background: #ecfdf5;
}


/* ============================================================
   BATTERIKALKULATOR SPESIFIKT
   ============================================================ */

.battery-bar {
  width: 100%;
  height: 22px;
  background: #334155;
  border-radius: 6px;
  margin-top: 0.5rem;
  overflow: hidden;
  border: 1px solid #475569;
}

.battery-fill {
  height: 100%;
  width: 50%;
  background: #10b981;
  transition: width 0.3s ease, background 0.3s ease;
}

.fade-hidden {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, height 0.4s ease;
}

.fade-visible {
  opacity: 1;
  height: auto;
  transition: opacity 0.4s ease, height 0.4s ease;
}

.live-tag {
  margin-top: 0.5rem;
  padding: 0.4rem 0.7rem;
  background: #065f46;
  color: #d1fae5;
  border-left: 4px solid #10b981;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.live-tag.visible {
  display: block;
  opacity: 1;
}

.max-info {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #93c5fd;
}
