/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 500px;
  z-index: 9999;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.notification-success {
  background: rgba(101, 231, 49, 0.15);
  border: 1px solid rgba(79, 174, 7, 0.3);
  color: #89f354;
}

.notification-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.notification-hide {
  animation: slideOut 0.3s ease-out;
}

/* ------- COLORS (Settings) ------- */

:root {
  --color:            rgb(94, 94, 94);
  --background-color: #111;
  --text-color:       #fff;
  --text-light-color: #878787;
  --border-color:     rgba(192, 192, 192, 0.447);
}

/* =========================================================
   GLOBAL
========================================================= */

body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  background: #111;
  color: white;
}

/* Allow scrolling on the settings page (main stylesheet sets overflow hidden) */
body.settings-page {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Wrapper */
.settings-wrapper {
  width: 94%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: calc(0.25rem * 8);
}

.settings-inner {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* =========================================================
   HEADER
========================================================= */

.settings-back {
  color: #bbb;
  font-size: 14px;
  text-decoration: none;
  transition: 0.2s;
}
.settings-back:hover {
  color: white;
}

.settings-header h1 {
  margin: 0.25rem 0 0 0;
  font-size: 3.2rem;
  letter-spacing: 0.03em;
  font-style: italic;
  text-transform: lowercase;
}

/* Tabs */
.settings-tabs {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.settings-tab-link {
  padding: 0.45rem 1rem;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #444;
  color: white;
  text-decoration: none;
  transition: 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-icon {
  width: 14px;
  height: 14px;
}

.settings-tab-link:hover {
  background: #1b1b1b;
}

.settings-tab-link.active {
  background: white;
  color: #111;
  font-weight: 700;
}

/* =========================================================
   SECTIONS
========================================================= */

.settings-content {
  border-top: 1px solid #2b2b2b7d;
  border-bottom: 1px solid #2b2b2b7d;
}

.settings-section {
  padding: 1.75rem 0;
  border-bottom: 1px solid #2b2b2b7d;
}

.settings-section:last-child {
  border-bottom: none;
}

.section-header h2 {
  margin: 0 0 0.6rem;
  font-size: 20px;
}

.section-header p {
  margin: 0;
  color: #aaa;
  font-size: 17px;
  line-height: 1.4;
  max-width: 100%;
}

/* FIX: Prevent Auto Cloak wrapping */
.section-header.with-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header.with-toggle > div {
  max-width: 90%;
  min-width: 420px;
}

/* =========================================================
   INPUTS
========================================================= */

.section-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.input-group label {
  font-size: 14px;
  font-weight: 600;
}

.text-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid #555;
  border-radius: 6px;
  color: white;
  font-size: 14px;
  transition: 0.15s;
}
.text-input:focus {
  border-color: #fff;
  outline: none;
}

/* =========================================================
   BUTTONS
========================================================= */

/* ========== BUTTON FIX (RESET & BASE STYLE) ========== */

button {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  color: inherit;
}

/* Smooth animations & consistent feel */
button,
.pill-btn,
.option-btn,
.primary-btn,
.secondary-btn {
  transition: 0.2s ease;
}

.pill-btn {
  padding: 8px 18px;
  background: #fff;
  color: #111;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  width: fit-content;
  display: block;
}
.pill-btn:hover {
  background: #e6e6e6;
  color: #111;
}

/* Cards */

.button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Ensure transport buttons always stay in a row for 3 options */
.transport-grid {
  grid-template-columns: repeat(3, 1fr);
}

.option-btn {
  padding: 1rem 1.1rem;
  border-radius: 8px;
  border: 2px solid transparent;
  font-size: 15px;
  background: #161616;
  color: white;
  text-align: left;
  font-weight: 600;
  transition: all 0.2s ease;
}

.option-btn:hover {
  background: #1f1f1f;
}

.option-btn.selected {
  background: #262626;
  color: #fff;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.subtext {
  display: block;
  margin-top: 0.22rem;
  font-size: 12.5px;
  color: #9c9c9c;
  font-weight: 400;
}

/* Primary action */
.primary-btn {
  width: 100%;
  padding: 0.65rem;
  margin-top: 0.85rem;
  border-radius: 6px;
  background: white;
  color: #111;
  border: none;
  font-size: 14px;
  font-weight: 600;
}
.primary-btn:hover {
  background: #e6e6e6;
}

/* Data actions */
.data-block {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.data-header h2 {
  margin: 0 0 0.4rem;
  font-size: 20px;
}

.data-header p {
  margin: 0;
  color: #aaa;
  font-size: 17px;
  line-height: 1.4;
}

.data-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.data-btn {
  flex: 1 1 0;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #3a3a3a;
  background: #181818;
  color: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.data-btn svg {
  width: 16px;
  height: 16px;
}

.data-btn-primary {
  border: none;
  background: #fff;
  color: #111;
}

.data-btn-primary:hover {
  background: #aeaeae;
  color: #111;
}

.data-btn-secondary {
  background: #141414;
  border-color: #353535;
}

.data-btn-secondary:hover {
  background: #1b1b1b;
  border-color: #4a4a4a;
}

.data-hint {
  margin: 0;
  font-size: 17px;
  color: #9b9b9b;
}

/* =========================================================
   TOGGLES
========================================================= */

.toggle input {
  display: none;
}

.toggle-switch {
  width: 42px;
  height: 22px;
  background: #222;
  border: 1px solid #555;
  border-radius: 22px;
  position: relative;
  transition: 0.2s;
  display: inline-block;
  cursor: pointer;
}

.toggle-switch::after {
  content: "";
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 3px;
  transition: 0.25s;
}

.toggle input:checked + .toggle-switch {
  background: white;
}

.toggle input:checked + .toggle-switch::after {
  left: 22px;
  background: #111;
}

/* =========================================================
   HELP TEXT
========================================================= */

.help-text {
  margin-top: 0.55rem;
  font-size: 13px;
  color: #9b9b9b;
}
