/* ===== RESET ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  outline: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

a {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
  color: inherit;
}

:root {
  /* Colors */
  --color-primary: #1c69d3; /* BMW Blue */
  --color-primary-dark: #0653b6; /* Darker blue for hover */
  --color-accent: #e21936; /* BMW M Red for accents */

  /* Neutrals */
  --color-bg: #d9d0c1; /* Light gray background */
  --color-surface: #ffffff; /* White cards/forms */
  --color-text: #1a1a1a; /* Near black text */
  --color-text-light: #666666; /* Gray subtext */
  --color-border: #e0e0e0; /* Light borders */

  /* Typography */
  --font-primary: "Segoe UI", system-ui, sans-serif;
  --font-heading: "Segoe UI", system-ui, sans-serif;

  /* Spacing */
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Home ===== */

#root {
  min-height: 100vh;
}

.home-container {
  min-height: 100vh;
  background-color: var(--color-bg);
  padding: 1rem;

  .site-title {
    font-size: 2rem;
    color: var(--color-primary-dark);
    font-weight: 700;
    padding-bottom: 2rem;
  }
}

/* ===== Configurator ===== */

.flex-col {
  /* Flex gap Custom Property */
  --flex-col--gap: 1rem;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--flex-col--gap);

  /* ---large gap--- */
  &[data-gap="large"] {
    --flex-col--gap: 2rem;
  }
}

.configurator-container {
  height: 100vh;
  background-color: var(--color-bg);
  padding: 1rem;
}

.configurator-form {
  width: 100%;
  max-width: 500px;

  h2 {
    color: var(--color-primary-dark);
    padding-block: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
  }

  select {
    background-color: #c5c0b8;
    color: var(--color-text);
    border: 2px solid #a09b93;
    padding: 0.75rem 1rem;
    margin-block: 2rem;
    font-size: 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s ease;
    width: 100%;
    max-width: 200px;

    &:focus {
      border-color: #1c69d3;
      outline: none;
      box-shadow: 0 0 0 2px rgba(28, 105, 211, 0.2);
    }

    &:hover {
      border-color: #1c69d3;
    }
  }
}

.packages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  font-size: 1.2rem;
  padding-block: 1rem;

  .package-option {
    display: flex;
    gap: 1rem;
    align-items: center;

    cursor: pointer;

    input[type="checkbox"] {
      width: 1.2rem;
      height: 1.2rem;
    }
  }
}

.review-summary {
  .review-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
    width: 100%;

    &p:last-child {
      word-break: break-word;
    }
  }
}

/* ===== Shared ===== */
.step-btns {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.notFound-container {
  font-size: 1.5rem;
  color: #e21936;
  height: 100vh;
}

/* ===== Progress Bar ===== */

.progress-container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
  text-align: center;
}

/* ------------------------------------ */
/* ===== Dashboard ===== */
/* ------------------------------------ */

.dashboard-container {
  min-height: 100vh;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.dashboard-title {
  font-size: 1.75rem;
  color: var(--color-primary-dark);
  font-weight: 700;
}

.configs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
}

.config-card {
  background-color: #f5f0e8;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.config-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.config-card-model {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.btn-delete {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.btn-delete:hover {
  background-color: rgba(226, 25, 54, 0.1);
}

.config-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.config-card-details p {
  font-size: 0.95rem;
  color: var(--color-text);
}

.config-card-details strong {
  color: var(--color-text);
}

.empty-state {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.1rem;
  padding: 2rem;
}

.empty-state p:first-child {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hidden {
  display: none;
}
