/* Updated Variables for Minimal Modern Design */
:root {
  --primary-color: #213158;
  --primary-darker-color: #1a2540;
  --primary-lighter-color: #f0f4ff;
  --secondary-color: #8cc3ea;
  --secondary-darker-color: #4795be;
  --danger-color: #dc2626;
  --danger-darker-color: #991b1b;
  --green-color: #16a34a;
  --orange-color: #ea580c;
  --gray-color: #6b7280;
  --border-radius: 0;
  --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --transition-base: all 0.2s ease;
}

/* Minimal Base Styles */
html {
  box-sizing: border-box;
  background-color: #f9fafb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  line-height: 1.5;
  color: #374151;
  font-size: 14px;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  color: var(--primary-color);
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-darker-color);
}

ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

ul li {
  margin-bottom: 8px;
}

/* Minimal Utility Classes */
.primary-color {
  color: var(--primary-color);
}
.secondary-color {
  color: var(--secondary-color);
}
.gray {
  color: var(--gray-color);
}
.green {
  color: var(--green-color);
}
.orange {
  color: var(--orange-color);
}
.danger {
  color: var(--danger-color);
}
.bg-danger {
  background: var(--danger-color);
}
.shadow {
  box-shadow: var(--box-shadow);
}
.hidden {
  display: none;
}

/* Minimal Pills */
.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  color: white;
}

.pill.danger {
  background: var(--danger-color);
}
.pill.money {
  background: var(--green-color);
}

.time-pill {
  margin-left: 16px;
  padding: 4px 8px;
  border-radius: 0;
  background: rgba(55, 65, 81, 0.9);
  color: #f9fafb;
  font-size: 12px;
  font-weight: 500;
}

/* Minimal Documents */
.documents ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.documents ul li:hover {
  border-color: #d1d5db;
  box-shadow: var(--box-shadow);
}

.documents ul img {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

/* Minimal Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 0;
}

.tab {
  padding: 12px 20px;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: #6b7280;
  transition: all 0.2s ease;
}

.tab:hover {
  color: var(--primary-color);
  background: #f9fafb;
}

.tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: #ffffff;
}

.panels {
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-top: none;
  background: #ffffff;
  border-radius: 0;
}

.panel {
  display: none;
}

.panel:not(.hidden) {
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    font-size: 13px;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .tab {
    padding: 10px 16px;
    font-size: 13px;
  }

  .panels {
    padding: 16px;
  }
}
/* Distance Calculation Form - Using Existing Form & Button Styles */
.distance-calculation-container {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem;
  background-color: hsl(var(--background));
}

.step-header {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.step-header h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.step-header p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.step-header p:last-child {
  margin-bottom: 0;
}

.step-header p strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* Distance Form - Uses your existing form styles */
.distance-form {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0;
  padding: 2rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  margin-bottom: 1.5rem;
}

/* Form Section */
.form-section {
  margin-bottom: 2rem;
}

.form-section:last-of-type {
  margin-bottom: 0;
}

/* Alert Styles */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 0;
  margin-bottom: 1.5rem;
  border: 1px solid;
  font-size: 0.875rem;
}

.alert-destructive {
  background-color: hsl(var(--destructive) / 0.1);
  border-color: hsl(var(--destructive) / 0.3);
  color: hsl(var(--destructive));
}

.alert-info {
  background-color: hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary) / 0.3);
  color: hsl(var(--primary));
}

.alert h5 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: inherit;
}

.alert ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
}

.alert ul li {
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.alert ul li:last-child {
  margin-bottom: 0;
}

/* Form Row Grid - Works with your existing form-group styles */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-start;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

/* Info Section */
.info-section {
  margin-top: 1.5rem;
}

/* Loading State */
.distance-form.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.distance-form.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  border: 2px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: distance-form-spin 1s linear infinite;
  z-index: 10;
}

@keyframes distance-form-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .distance-calculation-container {
    padding: 1rem;
  }

  .step-header {
    padding: 1rem;
  }

  .step-header h2 {
    font-size: 1.5rem;
  }

  .distance-form {
    padding: 1.5rem;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .button-primary,
  .form-actions .button-outline-small {
    width: 100%;
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .distance-calculation-container {
    padding: 0.75rem;
  }

  .step-header {
    padding: 0.75rem;
  }

  .step-header h2 {
    font-size: 1.25rem;
  }

  .distance-form {
    padding: 1rem;
  }

  .alert {
    padding: 0.75rem 1rem;
  }
}

/* Animation for form appearance */
.distance-calculation-container {
  animation: distance-form-fade-in 0.3s ease-out;
}

@keyframes distance-form-fade-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ensure existing button styles work properly in form context */
.form-actions .button-primary,
.form-actions .button-outline-small {
  flex-shrink: 0;
}

/* Form validation integration with your existing styles */
.distance-form .form-group.has-error input,
.distance-form .form-group.has-error select {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.distance-form .form-group.has-success input,
.distance-form .form-group.has-success select {
  border-color: var(--green-color);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Error message styling using your existing .error class */
.distance-form .form-group .error {
  color: var(--danger-color);
  margin: 6px 0 0 0;
  font-size: 12px;
  font-weight: 500;
}
