/* ── Register sliding track ─────────────────────────────── */

.register-viewport {
  overflow: hidden;
  width: 100%;
  margin-top: 24px;
}

.register-track {
  display: flex;
  width: 300%;
  transition: transform 260ms ease;
}

.register-step {
  display: grid;
  width: 33.3333%;
  min-width: 33.3333%;
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 0;
}

.register-step legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.terms-agreement {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  line-height: 1.35;
}

.terms-agreement input {
  margin-top: 2px;
}

.terms-agreement span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ── Location autocomplete ─────────────────────────────── */

.location-autocomplete {
  position: relative;
}

.location-results {
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.location-result {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid #e4e4e7;
  background: #ffffff;
  padding: 10px 12px;
  color: #09090b;
  font-size: 14px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.location-result:last-child {
  border-bottom: 0;
}

.location-result:hover,
.location-result:focus {
  background: #f4f4f5;
  outline: none;
}

/* ── Option chips (activity / choice / pulse) ───────────── */

.activity-option input,
.choice-option input,
.pulse-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.activity-option span,
.choice-option span,
.pulse-choice span {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  padding: 10px;
  background: #ffffff;
  color: #09090b;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.activity-option input:checked + span,
.choice-option input:checked + span,
.pulse-choice input:checked + span {
  border-color: #047857;
  background: #047857;
  color: #ffffff;
}

.activity-option input:disabled + span,
.choice-option input:disabled + span {
  opacity: 0.42;
  cursor: not-allowed;
}

.activity-option input:focus + span,
.choice-option input:focus + span,
.pulse-choice input:focus + span {
  border-color: #059669;
}

/* ── Tab bar ─────────────────────────────────────────────── */

.tab-btn {
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 2px solid transparent;
}

.tab-btn.is-active {
  border-bottom-color: #047857;
  color: #047857;
}

/* ── JS-toggled state classes ───────────────────────────── */

/* .is-hidden is defined in base.html <style type="text/tailwindcss"> as an
   unlayered rule so it beats all Tailwind @layer utilities (e.g. inline-flex) */

.is-error {
  color: #b91c1c;
  font-weight: 700;
}

[data-step-dot].is-active {
  background-color: #047857;
}

/* ── Mobile dashboard ───────────────────────────────────── */

.dashboard-shell {
  position: relative;
}

.dashboard-panel,
.pulse-card,
.compact-card,
.request-card {
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.dashboard-panel summary::-webkit-details-marker {
  display: none;
}

.pulse-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.compact-card,
.request-card {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #71717a;
  font-size: 12px;
  font-weight: 600;
}

.dashboard-meta span {
  border-radius: 6px;
  background: #f4f4f5;
  padding: 5px 8px;
}

.status-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}

.status-expired {
  background: #f4f4f5;
  color: #71717a;
}

.status-pending {
  background: #fef2f2;
  color: #b91c1c;
}

.status-requested {
  background: #fef2f2;
  color: #b91c1c;
}

.status-accepted {
  background: #d1fae5;
  color: #065f46;
}

.status-rejected {
  background: #f4f4f5;
  color: #71717a;
}

.dashboard-empty {
  border: 1px dashed #d4d4d8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  padding: 18px;
  color: #71717a;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.dashboard-edit {
  border-top: 1px solid #e4e4e7;
  padding-top: 10px;
}

.dashboard-edit summary {
  min-height: 42px;
  cursor: pointer;
  list-style-position: inside;
  border-radius: 8px;
  color: #09090b;
  font-size: 14px;
  font-weight: 700;
}

.refresh-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  background: #ffffff;
  padding: 9px 12px;
  color: #09090b;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.button-soft,
.button-dark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.button-soft {
  border: 1px solid #d4d4d8;
  background: #ffffff;
  color: #09090b;
}

.button-dark {
  border: 1px solid #047857;
  background: #047857;
  color: #ffffff;
}

.button-dark:hover {
  background: #065f46;
  border-color: #065f46;
}

.filter-strip {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  overflow: visible;
  padding-bottom: 2px;
}

.filter-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 14px;
  color: #71717a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.filter-toggle.is-active {
  border-color: #047857;
  background: #047857;
  color: #ffffff;
}

.filter-sort {
  display: flex;
  flex: 0 0 auto;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  overflow: hidden;
}

.filter-sort a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: #ffffff;
  color: #71717a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.filter-sort a + a {
  border-left: 1px solid #d4d4d8;
}

.filter-sort a.is-active {
  background: #ecfdf5;
  color: #047857;
}

.filter-level {
  position: relative;
  z-index: 10;
  flex: 0 0 auto;
  width: 128px;
}

.filter-level summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px 10px 14px;
  color: #71717a;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.filter-level summary::-webkit-details-marker {
  display: none;
}

.filter-level summary::after {
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
  transition: transform 0.15s;
}

.filter-level[open] summary::after {
  transform: rotate(180deg);
}

.filter-level.is-active summary {
  border-color: #047857;
  background: #047857;
  color: #ffffff;
}

.filter-level[open] summary {
  border-color: #047857;
}

.filter-level-menu {
  display: grid;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 30;
  overflow: hidden;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.filter-level-menu a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 9px 14px;
  color: #71717a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.filter-level-menu a + a {
  border-top: 1px solid #e4e4e7;
}

.filter-level-menu a.is-active {
  background: #ecfdf5;
  color: #047857;
}

.bottom-tab-nav {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
}

.bottom-tab-btn {
  position: relative;
  display: grid;
  min-height: 54px;
  place-items: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #71717a;
  font-size: 12px;
  font-weight: 600;
}

.bottom-tab-btn.is-active {
  border-color: #047857;
  background: #047857;
  color: #ffffff;
}

.tab-badge {
  display: inline-flex;
  min-width: 22px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #b91c1c;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

@media (min-width: 640px) {
  .bottom-tab-nav {
    right: 24px;
    bottom: 24px;
    left: 24px;
  }
}
