/**
 * Cascading Select Example - Styles
 * Styling for cascading dropdown select demonstration
 * Uses Now.js framework CSS variables
 */
/* Form Layout */
.form-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.form-group {
  flex: 1;
  min-width: 200px;
}
.form-group label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 500;
  color: var(--color-text);
}
/* Result Display */
.result-container {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background-color: var(--color-surface);
  border-radius: var(--border-radius);
  display: none;
}
.result-container.visible {
  display: block;
}
.result-container h4 {
  margin-top: 0;
  margin-bottom: var(--space-3);
}
.result-container .address-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}
.result-container .address-item {
  padding: var(--space-2);
  background-color: var(--color-background);
  border-radius: var(--border-radius);
}
.result-container .address-item .label {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-1);
}
.result-container .address-item .value {
  font-weight: 500;
  color: var(--color-text);
}
/* Feature Cards */
.feature-card.cascade-card {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-hover) 100%);
}
/* Selection Preview */
.selection-preview {
  margin-top: var(--space-4);
  padding: var(--space-3);
  background-color: var(--color-background);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--color-primary);
}
.selection-preview h4 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.selection-preview .preview-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
}
.selection-preview .preview-text.empty {
  color: var(--color-text-light);
  font-style: italic;
}
/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
}
.comparison-table th,
.comparison-table td {
  padding: var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.comparison-table th {
  background-color: var(--color-surface);
  font-weight: 600;
}
.comparison-table tr:hover {
  background-color: var(--color-surface);
}
/* Loading State */
.form-group.loading select {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2"><circle cx="12" cy="12" r="10" stroke-dasharray="30" stroke-dashoffset="10"><animateTransform attributeName="transform" type="rotate" from="0 12 12" to="360 12 12" dur="1s" repeatCount="indefinite"/></circle></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
  padding-right: 36px;
}
/* Responsive Adjustments */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: var(--space-3);
  }
  .form-group {
    min-width: 100%;
  }
}
/* Compact Address Layout */
.address-compact {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.address-compact .form-group {
  flex: 1;
  min-width: 150px;
}
.address-compact select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background-color: var(--color-background);
  font-size: 1rem;
  color: var(--color-text);
}
/* Output Section */
.output-section {
  margin-top: var(--space-4);
}
/* How It Works */
.how-it-works {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
}
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--highlight-bg);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: bold;
  flex-shrink: 0;
}
.step-content h4 {
  margin: 0 0 0.5rem 0;
  color: var(--highlight-bg);
}
.step-content p {
  margin: 0;
  color: var(--color-text-light);
}
.step-content code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  color: #e83e8c;
}
/* Address Result Card */
.address-result-card {
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.address-result-card h4 {
  margin: 0 0 1rem 0;
  color: var(--color-success, #10b981);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.address-result-card h4 i {
  color: var(--color-success, #10b981);
}
.address-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.address-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: var(--color-background);
  border-radius: var(--border-radius);
}
.address-row .label {
  font-size: 0.875rem;
  color: var(--color-text-light);
  font-weight: 500;
}
.address-row .value {
  font-weight: 600;
  color: var(--color-text);
}
.full-address {
  padding: 1rem;
  background: var(--color-background);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--highlight-bg);
}
.full-address strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-text-light);
  font-size: 0.875rem;
}
.full-address p {
  margin: 0;
  font-size: 1.125rem;
  color: var(--color-text);
}