/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background: linear-gradient(to bottom right, #f0f4ff, #e6e9ff);
  min-height: 100vh;
  padding: 2rem;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.back-button {
  position: absolute;
  left: 0;
  top: -1rem;
  padding: 0.75rem 1.5rem;
  background-color: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s;
}

.back-button:hover {
  background-color: #4338ca;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 2.5rem;
  color: #1e1e1e;
  margin-bottom: 0.5rem;
}

.header p {
  color: #666;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.form-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.1rem;
  color: #2d3748;
  margin-bottom: 1rem;
  font-weight: 500;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.card-checkbox {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
}

.card-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.card-checkbox:hover {
  border-color: #4f46e5;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Updated checkbox styling */
.card-checkbox input[type="checkbox"]:checked ~ .card-details {
  color: #4f46e5;
}

.card-checkbox input[type="checkbox"]:checked ~ * {
  border-color: #4f46e5;
}

.card-checkbox:has(input[type="checkbox"]:checked) {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
  transform: scale(1.02);
  background-color: #f8fafc;
}

.card-details {
  text-align: center;
  padding: 0.5rem;
  width: 100%;
  display: block;
}

.card-details h4 {
  font-size: 1.1rem;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.card-details p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: #4a5568;
}

.button {
  display: block;
  width: 100%;
  padding: 1rem;
  background-color: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.button:hover {
  background-color: #4338ca;
}

/* Customer Information Styling */
.customer-info {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.customer-card {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.customer-label {
  font-size: 1rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 0.5rem;
  display: block;
}

.customer-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1rem;
  color: #2d3748;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.customer-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
  outline: none;
}

#result {
  display: none;
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#resultText {
  white-space: pre-wrap;
  line-height: 1.6;
}

.collapsible-trigger {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapse-icon {
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.collapsible-content {
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.3s ease-in-out;
}

.collapsible-section.collapsed .collapsible-content {
  max-height: 0;
}

.collapsible-section.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.subsection-title {
  font-size: 1rem;
  color: #4a5568;
  margin: 1.5rem 0 1rem 0;
  font-weight: 500;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
  .progress-bar {
      flex-direction: column;
      align-items: stretch;
  }

  .progress-step {
      padding: 0.5rem;
      margin-bottom: 0.5rem;
      border-radius: 4px;
  }

  .button-container {
      flex-direction: column;
      gap: 1rem;
  }

  .button-container button {
      width: 100%;
  }
}