/* ========================================================================
   BRIX Templates Design System - styles.css
   Organization Schema Generator
   Version: 1.0.0
   ======================================================================== */

/* ========================================================================
   1. DESIGN TOKENS / CSS VARIABLES
   ======================================================================== */

:root {
  /* ======================
     Colors - Purple-Tinted Gray Scale
     ====================== */
  --gray-50: #fafafb;
  --gray-100: #f5f5f7;
  --gray-200: #e8e8ed;
  --gray-300: #d5d5dd;
  --gray-400: #a3a3b3;
  --gray-500: #73738c;
  --gray-600: #54546d;
  --gray-700: #40405a;
  --gray-800: #2a2a42;
  --gray-900: #1a1a2e;
  
  /* ======================
     Colors - Primary (Indigo)
     ====================== */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;
  
  /* ======================
     Colors - Background
     ====================== */
  --bg-lavender: #f7f7fc;  /* Light lavender background - adjusted to match reference */
  
  /* ======================
     Colors - Semantic
     ====================== */
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --error-500: #ef4444;
  --error-600: #dc2626;
  --info-500: #3b82f6;
  --info-600: #2563eb;
  
  /* ======================
     Spacing Scale (4px base)
     ====================== */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  
  /* ======================
     Border Radius
     ====================== */
  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;
  
  /* ======================
     Component Sizing
     ====================== */
  --size-control-sm: 20px;
  --size-icon-xs: 12px;
  --size-icon-sm: 16px;
  --size-icon-md: 20px;
  --size-icon-lg: 24px;
  --size-button-sm: 36px;
  --size-button-md: 40px;
  --size-button-lg: 44px;
  --size-input: 40px;
  --size-container-max: 800px;
  
  /* ======================
     Typography - Font Sizes
     ====================== */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  
  /* ======================
     Typography - Font Weights
     ====================== */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* ======================
     Typography - Line Heights
     ====================== */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* ======================
     Typography - Font Families
     ====================== */
  --font-sans: "Inter Tight", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
               Consolas, "Courier New", monospace;
  
  /* ======================
     Shadows
     ====================== */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 10px 25px rgba(0, 0, 0, 0.1);
  
  /* ======================
     Transitions
     ====================== */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-bounce: 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================================================
   2. RESET & BASE STYLES
   ======================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
select {
  -webkit-user-select: text;
  user-select: text;
}

/* Ensure Inter Tight is used as base font */
html {
  font-family: var(--font-sans);
}

/* Bootstrap Icons - Thin, refined stroke width */
.bi::before {
  font-weight: 400 !important;
}

.bi {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Icon size variations for different contexts */
.btn .bi,
.btn-primary .bi,
.btn-secondary .bi {
  font-size: 1.125rem;
  margin-right: 0.5rem;
}

.btn-remove .bi,
.btn-add-social .bi {
  font-size: 1rem;
  margin: 0;
}

.accordion-chevron {
  font-size: 0.875rem;
}

.checkbox-box .bi {
  font-size: 0.75rem;
  margin: 0;
}

/* Ensure all icon contexts maintain the thin stroke weight */
.accordion-icon,
.feature-icon,
.result-icon,
.validation-msg .bi {
  font-weight: 400;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--gray-700);
  background: var(--bg-lavender);
  padding: var(--space-8);
  max-width: var(--size-container-max);
  margin: 0 auto;
}

/* Ensure all elements inherit the font unless specifically overridden */
button, input, select, textarea {
  font-family: inherit;
}

/* ========================================================================
   3. TYPOGRAPHY
   ======================================================================== */

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--gray-800);
  margin-bottom: var(--space-3);
}

p {
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

/* ========================================================================
   4. LAYOUT COMPONENTS
   ======================================================================== */

.container {
  max-width: var(--size-container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.logo {
  width: 120px;
  height: auto;
  margin-bottom: var(--space-6);
  display: block;
}

/* ========================================================================
   5. CARDS & PANELS
   ======================================================================== */

.card {
  background: white;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: var(--space-4);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.card-compact {
  padding: var(--space-4);
}

.card-bordered {
  box-shadow: none;
  border: 1px solid var(--gray-100);
}

.card-elevated {
  box-shadow: var(--shadow-lg);
}

.card-header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--gray-100);
}

.card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-100);
}

/* ========================================================================
   6. BUTTONS
   ======================================================================== */

.btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none;
  line-height: 1;
  position: relative;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:focus {
  outline: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Button Variants */
.btn-primary {
  background: var(--primary-500);
  color: white;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  background: var(--primary-600);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--primary-500);
  border: 1px solid var(--primary-500);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: var(--primary-50);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.btn-ghost:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.btn-danger {
  background: var(--error-500);
  color: white;
}

.btn-danger:hover {
  background: var(--error-600);
}

.btn-success {
  background: var(--success-500);
  color: white;
}

.btn-success:hover {
  background: var(--success-600);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

.btn-md {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
}

/* Button States */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.copied {
  background: var(--success-500);
}

/* ========================================================================
   7. FORMS
   ======================================================================== */

.form-input {
  width: 100%;
  height: 45.5px;
  padding: 0 var(--space-4);
  border: 1px solid #e5e5e5;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  background: white;
}

.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid #e5e5e5;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  background: white;
}

.form-select {
  width: 100%;
  height: 45.5px;
  padding: 0 var(--space-12) 0 var(--space-4);
  border: 1px solid #e5e5e5;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 20px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: var(--leading-normal);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-medium);
  color: var(--gray-700);
  font-size: var(--text-sm);
}

/* Checkboxes and Radios */
.checkbox-wrapper,
.radio-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-3);
  cursor: pointer;
}

.checkbox,
.radio {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: var(--size-control-sm);
  height: var(--size-control-sm);
}

/* Schema Checkbox Specific Styles */
.schema-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: var(--size-control-sm);
  height: var(--size-control-sm);
  z-index: 1;
}

.checkbox-box,
.radio-box {
  width: var(--size-control-sm);
  height: var(--size-control-sm);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  margin-right: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  background: white;
  position: relative;
}

.radio-box {
  border-radius: var(--radius-full);
}

.checkbox-box i,
.radio-box i {
  font-size: 12px;
  color: white;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
}

/* Checkbox hover state */
.feature-item:hover .checkbox-box {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

.checkbox:checked ~ .checkbox-box,
.radio:checked ~ .radio-box,
.schema-checkbox:checked + label .checkbox-box {
  background: var(--primary-500);
  border-color: var(--primary-500);
  transform: scale(1);
}

.checkbox:checked ~ .checkbox-box i,
.radio:checked ~ .radio-box i,
.schema-checkbox:checked + label .checkbox-box i {
  opacity: 1;
  transform: scale(1);
}

.checkbox:focus ~ .checkbox-box,
.radio:focus ~ .radio-box,
.schema-checkbox:focus + label .checkbox-box {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Active/pressed state */
.checkbox:active ~ .checkbox-box,
.schema-checkbox:active + label .checkbox-box {
  transform: scale(0.95);
}

/* ========================================================================
   8. ACCORDION COMPONENTS
   ======================================================================== */

.accordion-container {
  margin-bottom: var(--space-6);
}

.accordion-item {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.04);
  margin-bottom: var(--space-4);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.accordion-header {
  width: 100%;
  padding: var(--space-6);
  background: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-base);
  position: relative;
}

.accordion-header:hover {
  background: rgba(99, 102, 241, 0.02);
}

.accordion-header:focus {
  outline: none;
}

.accordion-header:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.accordion-header-content {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-align: left;
  flex: 1;
}

.accordion-icon {
  color: var(--primary-500);
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.accordion-title {
  color: var(--gray-900);
  font-weight: var(--font-semibold);
  font-size: var(--text-lg);
  margin: 0;
  line-height: var(--leading-tight);
}

.accordion-description {
  color: var(--gray-500);
  font-size: var(--text-sm);
  margin: var(--space-1) 0 0 0;
  font-weight: var(--font-normal);
  line-height: var(--leading-snug);
}

.accordion-chevron {
  color: var(--gray-400);
  font-size: var(--text-lg);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-left: var(--space-3);
}

.accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
  color: var(--primary-500);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.accordion-item.active .accordion-content {
  max-height: 2000px;
  transition: max-height 0.4s ease-in;
}

.accordion-body {
  padding: 20px var(--space-6) var(--space-6) var(--space-6);
}

/* Active state styling */
.accordion-item.active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: rgba(99, 102, 241, 0.1);
}

.accordion-item.active .accordion-header {
  border-bottom: 1px solid var(--gray-100);
}

/* Smooth animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.accordion-item.active .accordion-body {
  animation: slideDown 0.3s ease-out;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .accordion-header {
    padding: var(--space-4);
  }
  
  .accordion-body {
    padding: 20px var(--space-4) var(--space-4) var(--space-4);
  }
  
  .accordion-header-content {
    gap: var(--space-3);
  }
  
  .accordion-icon {
    font-size: var(--text-lg);
  }
  
  .accordion-title {
    font-size: var(--text-base);
  }
  
  .accordion-description {
    font-size: var(--text-xs);
  }
}

@media (max-width: 480px) {
  .accordion-header {
    padding: var(--space-3);
  }
  
  .accordion-body {
    padding: 20px var(--space-3) var(--space-3) var(--space-3);
  }
  
  .accordion-header-content {
    gap: var(--space-2);
  }
  
  .accordion-description {
    display: none;
  }
}

/* ========================================================================
   9. SCHEMA GENERATOR SPECIFIC COMPONENTS
   ======================================================================== */

/* Action Card & Buttons */
.action-card {
  padding: var(--space-4);
}

.action-buttons {
  display: flex;
  gap: var(--space-3);
  margin: 0;
}

.action-buttons .btn {
  flex: 1;
}

@media (max-width: 480px) {
  .action-card {
    padding: var(--space-3);
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn {
    width: 100%;
  }
  
  .social-field {
    flex-wrap: nowrap;
  }
  
  .social-field select {
    flex: 0 0 35%;
    min-width: 120px;
  }
  
  .social-field input {
    flex: 1 1 60%;
  }
}

/* Feature Items */
.feature-item {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: var(--space-3);
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-item:not(.toggle-item) label {
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  padding: var(--space-2) 0;
  transition: background 0.15s ease;
  border-radius: var(--radius-md);
}

.feature-item:not(.toggle-item) label:hover {
  background: rgba(99, 102, 241, 0.02);
}

.feature-name {
  color: var(--gray-900);
  font-weight: var(--font-medium);
}

.feature-description {
  color: var(--gray-500);
  font-size: var(--text-sm);
  margin-left: var(--space-2);
}

/* Category Headers */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-1);
}

.category-title {
  color: var(--gray-900);
  font-weight: var(--font-semibold);
  font-size: var(--text-lg);
  margin: 0;
}

.category-description {
  color: var(--gray-500);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  font-weight: var(--font-normal);
}

/* Feature Count Badge */
.feature-count {
  color: var(--gray-600);
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-4);
  background: var(--gray-50);
  border-radius: var(--radius-md);
  font-weight: var(--font-medium);
  white-space: nowrap;
}

/* Code Display */
.code-display {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  max-height: 400px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  white-space: pre;
  word-wrap: break-word;
  color: var(--gray-900);
}

/* Features Container */
.features-container {
  position: relative;
  margin-bottom: var(--space-4);
}

.features-list {
  list-style: none;
  margin-bottom: 0;
  position: relative;
}

/* Result Section */
.result {
  margin-top: var(--space-4);
  padding: var(--space-6);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.result-header {
  margin-bottom: var(--space-4);
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-direction: row !important;
  gap: var(--space-4);
}

.result-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--gray-900);
  font-weight: var(--font-medium);
  font-size: var(--text-lg);
  flex: 0 1 auto;
}

.result-header .btn {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  flex: 0 0 auto !important;
  width: auto !important;
}

@media (max-width: 768px) {
  .result-header {
    flex-direction: column !important;
    align-items: stretch;
    gap: var(--space-3);
  }
  
  .result-header .btn {
    width: 100% !important;
  }
}

.result-icon {
  color: var(--primary-500);
  font-size: var(--text-xl);
}

/* Footer */
.by-brix {
  text-align: center;
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.by-brix a {
  color: var(--primary-500);
  text-decoration: none;
  font-weight: var(--font-medium);
  padding: 0 var(--space-2);
  margin-left: var(--space-1);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  display: inline-block;
  position: relative;
}

.by-brix a:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary-600);
}

/* Feature Icons */
.feature-icon {
  color: var(--primary-500);
  font-size: var(--text-base);
  margin-right: var(--space-2);
}

/* Toggle Switches for Advanced Settings */
.toggle-item {
  display: block;
  margin-bottom: var(--space-4);
  width: 100%;
  text-align: left;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  transition: background var(--transition-base);
  background: transparent;
  width: 100%;
  text-align: left;
}

.toggle-label:hover {
  background: rgba(99, 102, 241, 0.02);
}

.toggle-content {
  display: flex;
  align-items: center;
  flex: 1;
  gap: var(--space-3);
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  flex: 1;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--gray-300);
  border-radius: 13px;
  transition: background var(--transition-base);
  flex-shrink: 0;
}

.toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-base);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-input:checked + .toggle-label .toggle-switch {
  background: var(--primary-500);
}

.toggle-input:checked + .toggle-label .toggle-slider {
  transform: translateX(22px);
}

.toggle-input:focus + .toggle-label .toggle-switch {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.toggle-item .feature-name {
  font-weight: var(--font-medium);
  color: var(--gray-900);
  font-size: var(--text-base);
  line-height: 1.2;
  display: block;
  margin: 0;
}

.toggle-item .feature-description {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.3;
  display: block;
  margin: 0;
}

.toggle-item .feature-icon {
  color: var(--primary-500);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

/* Form Groups */
.form-group {
  margin-bottom: var(--space-4);
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Input and Textarea Elements */
.input,
.textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--gray-900);
  transition: all var(--transition-base);
  background: white;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--gray-400);
}

/* Date input calendar icon styling */
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  filter: invert(0.5);
}

input[type="date"]::-webkit-datetime-edit {
  color: var(--gray-400);
}

input[type="date"]:focus::-webkit-datetime-edit {
  color: var(--gray-900);
}

.textarea {
  resize: vertical;
  min-height: 100px;
  line-height: var(--leading-normal);
}

/* Input Labels and Helpers */
.input-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-medium);
  color: var(--gray-700);
  font-size: var(--text-sm);
}

.input-helper {
  display: block;
  margin-top: 6px;
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* Social Media Row */
.social-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.social-row .input-label {
  margin-bottom: 0;
  flex-shrink: 0;
}

.input-inline {
  width: 150px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  transition: all var(--transition-base);
  background: white;
}

.input-inline:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Grid Layout */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* Validation Messages */
.validation-msg {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  display: none;
}

.validation-msg.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-600);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: block;
}

.validation-msg.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-600);
  border: 1px solid rgba(239, 68, 68, 0.2);
  display: block;
}

/* Social Field */
.social-field {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  align-items: center;
}

.social-field select {
  height: 45.5px;
  flex: 0 0 30%;
  max-width: 200px;
  min-width: 140px;
}

.social-field input {
  height: 45.5px;
  flex: 1 1 65%;
}

.btn-remove {
  padding: var(--space-2);
  background: white;
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 45.5px;
  height: 45.5px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: var(--text-lg);
}

.social-field:not(:only-child) .btn-remove {
  display: flex;
}

.btn-remove:hover {
  background: var(--error-50, #fef2f2);
  border-color: var(--error-300, #fca5a5);
  color: var(--error-500);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

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

.btn-add-social {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: white;
  color: var(--primary-500);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 32px;
  margin-top: 20px;
  margin-bottom: var(--space-3);
}

.btn-add-social:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

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

/* ========================================================================
   10. SCROLLBAR STYLES
   ======================================================================== */

/* Custom scrollbar for code blocks */
.code-display::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.code-display::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: var(--radius-full);
}

.code-display::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
  transition: background var(--transition-base);
}

.code-display::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Firefox scrollbar styling */
.code-display {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) var(--gray-100);
}

/* Global thin scrollbars for better consistency */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) var(--gray-100);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--gray-50);
}

*::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-md);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ========================================================================
   11. RESPONSIVE DESIGN
   ======================================================================== */

/* Tablet styles */
@media (max-width: 768px) {
  body {
    padding: var(--space-4);
  }
  
  h1 {
    font-size: var(--text-3xl);
  }
  
  .card {
    padding: var(--space-4);
  }
  
  .result {
    padding: var(--space-4);
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Mobile styles - reduce font sizes by ~25% */
@media (max-width: 480px) {
  :root {
    /* Reduce all font sizes by ~25% */
    --text-xs: 0.625rem;     /* 10px (was 12px) */
    --text-sm: 0.75rem;      /* 12px (was 14px) */
    --text-base: 0.875rem;   /* 14px (was 16px) */
    --text-lg: 1rem;         /* 16px (was 18px) */
    --text-xl: 1.125rem;     /* 18px (was 20px) */
    --text-2xl: 1.25rem;     /* 20px (was 24px) */
    --text-3xl: 1.5rem;      /* 24px (was 30px) */
    --text-4xl: 1.75rem;     /* 28px (was 36px) */
  }
  
  body {
    padding: var(--space-3);
  }
  
  h1 {
    font-size: var(--text-2xl);
    line-height: 1.2;
  }
  
  .text-lg {
    font-size: var(--text-base);
    line-height: 1.5;
  }
  
  .card {
    padding: var(--space-3);
    margin-bottom: var(--space-3);
  }
  
  .result {
    padding: var(--space-3);
    margin-top: var(--space-3);
  }
  
  .category-title {
    font-size: var(--text-lg);
  }
  
  .category-description {
    font-size: var(--text-xs);
  }
  
  .feature-name {
    font-size: var(--text-sm);
  }
  
  .feature-description {
    font-size: var(--text-xs);
    display: block;
    margin-left: 0;
    margin-top: 2px;
  }
  
  .feature-item label {
    flex-wrap: wrap;
  }
  
  .feature-icon {
    font-size: var(--text-sm);
  }
  
  .checkbox-box {
    width: 18px;
    height: 18px;
    margin-right: var(--space-2);
  }
  
  .btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
  }
  
  .btn-primary {
    width: 100%;
  }
  
  .code-display {
    font-size: var(--text-xs);
    padding: var(--space-3);
    max-height: 300px;
  }
  
  .input-inline {
    width: 120px;
  }
  
  .social-row {
    gap: var(--space-2);
  }
  
  .logo {
    width: 80px;
    margin-bottom: var(--space-4);
  }
  
  /* Adjust spacing */
  .form-group {
    margin-bottom: var(--space-3);
  }
  
  .features-container {
    margin-bottom: var(--space-3);
  }
}

/* Very small mobile */
@media (max-width: 375px) {
  :root {
    /* Further reduce font sizes */
    --text-xs: 0.625rem;     /* 10px */
    --text-sm: 0.6875rem;    /* 11px */
    --text-base: 0.8125rem;  /* 13px */
    --text-lg: 0.9375rem;    /* 15px */
    --text-xl: 1rem;         /* 16px */
    --text-2xl: 1.125rem;    /* 18px */
    --text-3xl: 1.375rem;    /* 22px */
    --text-4xl: 1.625rem;    /* 26px */
  }
  
  h1 {
    font-size: var(--text-xl);
  }
  
  .feature-description {
    font-size: 0.625rem;
  }
  
  .input-inline {
    width: 100px;
  }
}