/* Create Form - Advanced Premium Design */

/* CSS Custom Properties for Design System */
:root {
  --primary-50: #fff7ed;
  --primary-100: #ffedd5;
  --primary-200: #fed7aa;
  --primary-400: #fb923c;
  --primary-500: #f21b23;
  --primary-600: #d91820;
  --primary-700: #c2410c;
  
  --neutral-50: #fafafa;
  --neutral-100: #e5e5e5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 40px rgba(255, 152, 0, 0.15);
}

/* Main Container - Glassmorphism Effect */
.create-form-container {
  padding: 2.5rem 3rem;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  /* box-shadow: 
    var(--shadow-xl),
    inset 0 1px 0 rgba(255, 255, 255, 0.6); */
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

/* Decorative Background Elements */
.create-form-container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 152, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.create-form-container::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.create-form-container > * {
  position: relative;
  z-index: 1;
}

/* Grid Layout */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* Description + Questions row: side-by-side, aligned top and same content box size */
.form-grid--description-questions {
  align-items: start;
}

/* Match Description label height to Questions header so tops align */
.form-grid--description-questions .form-group:first-child .form-label {
  min-height: 2.75rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.form-grid--description-questions .form-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-bottom: 0.5rem;
}

.form-grid--description-questions .form-grid-header-label {
  margin-bottom: 0;
}

.form-grid--description-questions .form-grid-header-btn {
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
}

/* Same height for description box and question selection box */
.form-grid--description-questions .form-textarea {
  height: 14rem;
  min-height: 14rem;
  max-height: 14rem;
  overflow-y: auto;
  resize: none;
}

.form-grid--description-questions .checkbox-list-container {
  height: 14rem;
  min-height: 14rem;
  max-height: 14rem;
}

/* Align Questions and Locations list headers (legacy: if used elsewhere) */
.form-grid--questions-locations .form-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-bottom: 0.5rem;
}

.form-grid--questions-locations .form-grid-header-label {
  margin-bottom: 0;
}

.form-grid--questions-locations .form-grid-header-btn {
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .create-form-container {
    padding: 1.5rem;
    border-radius: 1rem;
  }
}

/* Header Section - Modern Styling */
.create-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  position: relative;
}

.create-form-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 152, 0, 0.5) 20%,
    rgba(255, 152, 0, 0.5) 80%,
    transparent 100%
  );
}

.create-form-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--neutral-800) 0%, var(--neutral-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.03em;
  position: relative;
}

.create-form-title::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, var(--primary-500), var(--primary-600));
  border-radius: 2px;
}

/* Form Group with Floating Label Effect */
.form-group {
  margin-bottom: 1.75rem;
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--neutral-600);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.form-group:focus-within .form-label {
  color: var(--primary-600);
}

/* Advanced Input Fields */
.form-input,
.form-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--neutral-200);
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  background: rgba(255, 255, 255, 0.8);
  color: var(--neutral-800);
  box-shadow: var(--shadow-sm);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--neutral-400);
  font-weight: 400;
}

.form-input:hover,
.form-textarea:hover {
  border-color: var(--neutral-300);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  background: #ffffff;
  box-shadow: 
    0 0 0 4px rgba(255, 152, 0, 0.12),
    var(--shadow-lg);
  transform: translateY(-1px);
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.7;
}

/* Advanced Checkbox List - Card Style */
.checkbox-list-container {
  border: none;
  border-radius: 0.875rem;
  padding: 0.25rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(250,250,250,0.9) 100%);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.03),
    var(--shadow-sm);
  transition: all 0.3s ease;
}

.checkbox-list-container:hover {
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.03),
    var(--shadow-md);
}

.checkbox-list-container:focus-within {
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.03),
    0 0 0 4px rgba(255, 152, 0, 0.08);
}

/* Rounded scrollbar for checkbox lists - larger selection area */
.checkbox-list-container {
  overflow-y: auto;
  min-height: 14rem;
  max-height: 28rem;
  padding: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-500) rgba(0, 0, 0, 0.08);
}

.checkbox-list-container::-webkit-scrollbar {
  width: 8px;
}

.checkbox-list-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  margin: 0.25rem 0;
}

.checkbox-list-container::-webkit-scrollbar-thumb {
  background: var(--primary-500);
  border-radius: 9999px;
}

.checkbox-list-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

/* ========== Location & Sites section - New design ========== */
.location-sites-section {
  margin-top: 0.5rem;
}

.location-sites-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 0.25rem;
}

.location-sites-section__hint {
  font-size: 0.875rem;
  color: var(--neutral-500);
  margin: 0 0 1rem 0;
}

/* Country chips - horizontal pills */
.location-country-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.location-country-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 2px solid var(--neutral-200);
  border-radius: 2rem;
  background: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neutral-700);
  cursor: pointer;
  transition: all 0.2s ease;
}

.location-country-chip:hover {
  border-color: var(--primary-300);
  color: var(--neutral-800);
  background: var(--primary-50);
}

.location-country-chip--selected {
  border-color: var(--primary-500);
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: #fff;
}

.location-country-chip--selected:hover {
  border-color: var(--primary-600);
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: #fff;
}

.location-country-chip__check {
  font-size: 0.875rem;
  font-weight: 700;
}

.location-empty-hint {
  font-size: 0.875rem;
  color: var(--neutral-500);
}

/* Sites cards container - scrollbar matches questions field */
.location-sites-cards {
  max-height: 36rem;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-500) rgba(0, 0, 0, 0.08);
}

.location-sites-cards::-webkit-scrollbar {
  width: 8px;
}

.location-sites-cards::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  margin: 0.25rem 0;
}

.location-sites-cards::-webkit-scrollbar-thumb {
  background: var(--primary-500);
  border-radius: 9999px;
}

.location-sites-cards::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

.location-sites-cards-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.location-sites-cards-inner--multi-true {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-content: start;
}

@media (max-width: 767px) {
  .location-sites-cards-inner--multi-true {
    grid-template-columns: 1fr;
  }
}

.location-sites-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
  padding: 2rem;
  background: linear-gradient(180deg, var(--neutral-50) 0%, rgba(255,255,255,0.5) 100%);
  border: 2px dashed var(--neutral-200);
  border-radius: 1rem;
  color: var(--neutral-500);
  text-align: center;
}

.location-sites-empty__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.location-sites-empty p {
  margin: 0;
  font-size: 0.9375rem;
}

/* One card per country */
.location-sites-card {
  flex-shrink: 0;
  border: 1px solid var(--neutral-200);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.location-sites-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
  border: none;
  border-bottom: 1px solid var(--neutral-200);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.location-sites-card__header:hover {
  background: linear-gradient(135deg, var(--neutral-100) 0%, var(--neutral-150) 100%);
}

.location-sites-card__header-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.location-sites-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--neutral-800);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-sites-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--neutral-600);
  padding: 0.2rem 0.5rem;
  background: rgba(255,255,255,0.9);
  border-radius: 1rem;
  border: 1px solid var(--neutral-200);
}

.location-sites-card__chevron {
  font-size: 0.65rem;
  color: var(--neutral-500);
  transition: transform 0.2s ease;
}

.location-sites-card__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  max-height: 12rem;
  overflow-y: auto;
  transition: max-height 0.25s ease, padding 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-500) rgba(0, 0, 0, 0.08);
}

.location-sites-card__list::-webkit-scrollbar {
  width: 8px;
}

.location-sites-card__list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  margin: 0.25rem 0;
}

.location-sites-card__list::-webkit-scrollbar-thumb {
  background: var(--primary-500);
  border-radius: 9999px;
}

.location-sites-card__list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

.location-sites-card--collapsed .location-sites-card__list {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.location-sites-card__empty {
  grid-column: 1 / -1;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: var(--neutral-500);
}

/* Multi-card grid: slightly more compact tiles */
.location-sites-cards-inner--multi-true .location-sites-card__list {
  max-height: 10rem;
  grid-template-columns: 1fr;
}

.location-sites-cards-inner--multi-true .location-site-tile {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* Site tile - clickable card per site */
.location-site-tile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--neutral-200);
  border-radius: 0.75rem;
  background: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neutral-700);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 0;
}

.location-site-tile:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
  color: var(--neutral-800);
}

.location-site-tile--selected {
  border-color: var(--primary-500);
  background: linear-gradient(135deg, var(--primary-50) 0%, rgba(255, 237, 213, 0.9) 100%);
  color: var(--neutral-900);
}

.location-site-tile--selected:hover {
  border-color: var(--primary-600);
}

.location-site-tile__check {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--neutral-200);
  color: transparent;
}

.location-site-tile--selected .location-site-tile__check {
  background: var(--primary-500);
  color: #fff;
}

.location-site-tile__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-site-tile__type {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Summary badge */
.location-sites-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-700);
  background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
  border: 1px solid var(--neutral-200);
  border-radius: 2rem;
  box-shadow: var(--shadow-sm);
}

.location-sites-summary__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  font-size: 0.8125rem;
  background: var(--primary-500);
  color: #fff;
  border-radius: 1rem;
}

/* Legacy: UpdateForm and backwards compat */
.locations-by-country {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 18rem;
  max-height: 36rem;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.country-sites-block {
  flex-shrink: 0;
  border: 1px solid var(--neutral-200);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--neutral-50);
  min-height: 8rem;
}

.country-sites-header {
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--neutral-800);
  background: rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid var(--neutral-200);
}

.country-sites-block .checkbox-list-container {
  min-height: 10rem;
  max-height: 20rem;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0.5rem;
}

.countries-list.checkbox-list-container {
  min-height: 12rem;
  max-height: 18rem;
}

/* Checkbox Items - Interactive Cards (roomier tap/click area) */
.checkbox-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  margin: 0.35rem;
  border-radius: 0.625rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  min-height: 2.75rem;
}

.checkbox-item:hover {
  background: var(--primary-50);
  border-color: var(--primary-100);
  transform: translateX(4px);
}

.checkbox-item:has(.checkbox-input:checked) {
  background: linear-gradient(135deg, var(--primary-50) 0%, rgba(255, 237, 213, 0.6) 100%);
  border-color: var(--primary-200);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.1);
}

.checkbox-item:has(.checkbox-input:checked):hover {
  transform: translateX(4px) scale(1.01);
}

/* Custom Checkbox */
.checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid var(--neutral-300);
  border-radius: 0.375rem;
  background: white;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.checkbox-input:hover {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.checkbox-input:checked {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  border-color: var(--primary-600);
}

.checkbox-input:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  font-size: 1rem;
  color: var(--neutral-700);
  cursor: pointer;
  flex: 1;
  line-height: 1.5;
  font-weight: 500;
  transition: color 0.2s ease;
}

.checkbox-item:has(.checkbox-input:checked) .checkbox-text {
  color: var(--neutral-800);
}

/* Selection Counter - Badge Style */
.selected-count {
  margin-top: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--neutral-600);
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
  border-radius: 2rem;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.selected-count::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}

/* Form Actions - Premium Footer */
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  position: relative;
}

.form-actions::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--neutral-200) 20%,
    var(--neutral-200) 80%,
    transparent 100%
  );
}

/* Button System */
.btn {
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-secondary {
  background: linear-gradient(135deg, #ffffff 0%, var(--neutral-50) 100%);
  color: var(--neutral-700);
  border: 2px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--neutral-50) 0%, var(--neutral-100) 100%);
  border-color: var(--neutral-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: white;
  box-shadow: 
    0 4px 14px rgba(255, 152, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
  box-shadow: 
    0 8px 25px rgba(255, 152, 0, 0.4),
    var(--shadow-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 
    0 4px 12px rgba(255, 152, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:disabled {
  background: linear-gradient(135deg, var(--neutral-300) 0%, var(--neutral-400) 100%);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-600);
  border: 2px solid var(--primary-500);
  box-shadow: none;
}

.btn-outline-primary:hover {
  background: var(--primary-50);
  border-color: var(--primary-600);
  color: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-primary:disabled {
  background: var(--neutral-50);
  color: var(--neutral-400);
  border-color: var(--neutral-200);
  cursor: not-allowed;
  transform: none;
}

/* Error Message - Alert Style */
.error-message {
  padding: 1.125rem 1.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #b91c1c;
  border-radius: 0.75rem;
  border: 1px solid #fecaca;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.error-message::before {
  content: '⚠';
  font-size: 1.125rem;
}

/* Loading State */
.loading-container {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--neutral-500);
}

/* Entrance Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.create-form-container {
  animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group {
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }

.form-grid {
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: 0.1s;
}

/* Add Question Modal – matches main Create Form design (glassmorphism, primary accents, same inputs/buttons) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  animation: modalFadeIn 0.2s ease;
}

.modal-content {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 4rem);
  margin: auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.04);
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(242, 27, 35, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--neutral-200);
  background: transparent !important;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(242, 27, 35, 0.35) 25%, rgba(242, 27, 35, 0.35) 75%, transparent 100%);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neutral-800);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-close {
  background: linear-gradient(135deg, #ffffff 0%, var(--neutral-50) 100%);
  border: 2px solid var(--neutral-200);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  color: var(--neutral-600);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.btn-close:hover {
  border-color: var(--primary-400);
  color: var(--primary-600);
  background: var(--primary-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.modal-body {
  padding: 1.5rem 1.5rem 1.25rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.modal-body .form-group {
  margin-bottom: 1.5rem;
}

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

.modal-body .form-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--neutral-600);
  margin-bottom: 0.75rem;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.modal-body .form-group:focus-within .form-label {
  color: var(--primary-600);
}

.modal-body .form-label .required {
  color: var(--primary-500);
  margin-left: 0.125rem;
}

/* Match main form inputs: 2px border, shadow, hover/focus lift */
.modal-body .form-textarea,
.modal-body .form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--neutral-200);
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  color: var(--neutral-800);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-body .form-textarea {
  min-height: 5rem;
  max-height: 11rem;
  resize: vertical;
  line-height: 1.6;
}

.modal-body .form-textarea::placeholder,
.modal-body .form-input::placeholder {
  color: var(--neutral-400);
  font-weight: 400;
}

.modal-body .form-textarea:hover,
.modal-body .form-input:hover {
  border-color: var(--neutral-300);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.modal-body .form-textarea:focus,
.modal-body .form-input:focus {
  outline: none;
  border-color: var(--primary-500);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(242, 27, 35, 0.12), var(--shadow-lg);
  transform: translateY(-1px);
}

.modal-body .form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23525252' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Question options (multiple/single choice, dropdown) */
.question-options-group .form-hint {
  font-size: 0.8rem;
  color: var(--neutral-500);
  margin: 0.25rem 0 0.5rem 0;
  font-weight: 400;
}

.question-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.question-option-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.question-option-input {
  flex: 1;
  padding: 0.6rem 1rem !important;
  font-size: 0.9rem !important;
}

.question-option-remove {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 600;
  color: var(--neutral-600);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.question-option-remove:hover:not(:disabled) {
  background: var(--primary-50);
  color: var(--primary-600);
  border-color: var(--primary-200);
}

.question-option-remove:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.question-option-add {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
}

/* Footer matches form-actions: gradient line, same button styles */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-top: none;
  background: transparent !important;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.modal-footer .btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 0.75rem;
  letter-spacing: 0.03em;
}

.modal-footer .btn-primary {
  min-width: 10rem;
}

.modal-footer .btn-secondary {
  min-width: 5.5rem;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ================================
   DARK THEME (night mode) – same as Questions section
   Background: rgba(58, 56, 56, 0.95), light text
   ================================ */
body.night-mode .create-form-container {
  background: rgba(58, 56, 56, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}
body.night-mode .create-form-container::before,
body.night-mode .create-form-container::after {
  opacity: 0.3;
}
body.night-mode .create-form-header::after {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.2) 80%, transparent 100%);
}
body.night-mode .create-form-title {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.night-mode .create-form-title::before {
  background: linear-gradient(180deg, #f87171, #ef4444);
}
body.night-mode .form-label {
  color: rgba(255, 255, 255, 0.9);
}
body.night-mode .form-group:focus-within .form-label {
  color: #f87171;
}
body.night-mode .form-input,
body.night-mode .form-textarea {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
}
/* Form type and other select dropdowns: visible closed state + dropdown list */
body.night-mode select.form-input {
  background-color: rgba(58, 56, 56, 1);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
  color-scheme: dark;
  appearance: auto;
}
body.night-mode select.form-input option {
  background: rgba(58, 56, 56, 1);
  color: rgba(255, 255, 255, 0.95);
}
body.night-mode .form-input::placeholder,
body.night-mode .form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
body.night-mode .form-input:hover,
body.night-mode .form-textarea:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}
/* Disabled fields: readable in dark mode */
body.night-mode .form-input:disabled,
body.night-mode .form-textarea:disabled,
body.night-mode select.form-input:disabled {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  opacity: 1;
  cursor: not-allowed;
}
body.night-mode .form-input:focus,
body.night-mode .form-textarea:focus {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15), var(--shadow-lg);
}
body.night-mode select.form-input:focus {
  background-color: rgba(58, 56, 56, 1);
  color: rgba(255, 255, 255, 0.95);
}
body.night-mode .checkbox-list-container {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), var(--shadow-sm);
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.06);
}
body.night-mode .checkbox-list-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}
body.night-mode .checkbox-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
}
body.night-mode .checkbox-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}
body.night-mode .checkbox-list-container:focus-within {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(248, 113, 113, 0.15);
}
body.night-mode .checkbox-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
body.night-mode .checkbox-item:has(.checkbox-input:checked) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}
body.night-mode .checkbox-input {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}
body.night-mode .checkbox-input:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
body.night-mode .checkbox-input:checked {
  background: rgba(248, 113, 113, 0.35);
  border-color: rgba(248, 113, 113, 0.5);
}
body.night-mode .checkbox-input:checked::after {
  border-color: rgba(255, 255, 255, 0.95);
}
body.night-mode .checkbox-text {
  color: rgba(255, 255, 255, 0.9);
}
body.night-mode .checkbox-item:has(.checkbox-input:checked) .checkbox-text {
  color: rgba(255, 255, 255, 0.98);
}
body.night-mode .selected-count {
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.06) 100%);
  border-color: rgba(255, 255, 255, 0.2);
}
body.night-mode .selected-count::before {
  background: #f87171;
}
/* Location & Sites - night mode */
body.night-mode .location-sites-section__title { color: rgba(255, 255, 255, 0.95); }
body.night-mode .location-sites-section__hint { color: rgba(255, 255, 255, 0.55); }
body.night-mode .location-country-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}
body.night-mode .location-country-chip:hover {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.12);
}
body.night-mode .location-country-chip--selected {
  border-color: #f87171;
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  color: #fff;
}
body.night-mode .location-sites-empty {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}
body.night-mode .location-sites-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}
body.night-mode .location-sites-card__header {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
body.night-mode .location-sites-card__header:hover {
  background: rgba(255, 255, 255, 0.12);
}
body.night-mode .location-sites-card__title { color: rgba(255, 255, 255, 0.95); }
body.night-mode .location-sites-card__badge {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
}
body.night-mode .location-sites-card__chevron {
  color: rgba(255, 255, 255, 0.5);
}
body.night-mode .location-site-tile {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.88);
}
body.night-mode .location-site-tile:hover {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.12);
}
body.night-mode .location-site-tile--selected {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(248, 113, 113, 0.2);
  color: #fff;
}
body.night-mode .location-site-tile--selected .location-site-tile__check {
  background: #f87171;
  color: #fff;
}
body.night-mode .location-site-tile__type { color: rgba(255, 255, 255, 0.5); }
body.night-mode .location-sites-summary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
}
body.night-mode .location-sites-summary__count { background: #f87171; }
body.night-mode .location-sites-cards,
body.night-mode .location-sites-card__list {
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.06);
}
body.night-mode .location-sites-cards::-webkit-scrollbar-track,
body.night-mode .location-sites-card__list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}
body.night-mode .location-sites-cards::-webkit-scrollbar-thumb,
body.night-mode .location-sites-card__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
}
body.night-mode .location-sites-cards::-webkit-scrollbar-thumb:hover,
body.night-mode .location-sites-card__list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}
body.night-mode .form-actions::before {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 20%, rgba(255, 255, 255, 0.15) 80%, transparent 100%);
}
body.night-mode .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
}
body.night-mode .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(248, 113, 113, 0.5);
  color: #f87171;
}
body.night-mode .btn-outline-primary {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.7);
}
body.night-mode .btn-outline-primary:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: #f87171;
  color: #fca5a5;
}
body.night-mode .create-form-container .error-message {
  background: rgba(248, 113, 113, 0.12) !important;
  color: #fca5a5 !important;
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: none;
}
body.night-mode .create-form-container .error-message::before {
  opacity: 0.9;
}
body.night-mode .create-form-container .checkbox-list-container > div {
  color: rgba(255, 255, 255, 0.8);
}
body.night-mode .loading-container {
  color: rgba(255, 255, 255, 0.8);
}
/* Create Form modal in dark theme */
body.night-mode .modal-content {
  background: rgba(38, 36, 36, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
body.night-mode .modal-content::before {
  background: radial-gradient(circle, rgba(248, 113, 113, 0.12) 0%, transparent 70%);
}
body.night-mode .modal-header {
  background: transparent !important;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
body.night-mode .modal-header::after {
  background: linear-gradient(90deg, transparent 0%, rgba(248, 113, 113, 0.4) 25%, rgba(248, 113, 113, 0.4) 75%, transparent 100%);
}
body.night-mode .modal-header h2 {
  color: rgba(255, 255, 255, 0.95);
}
body.night-mode .btn-close {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}
body.night-mode .btn-close:hover {
  border-color: rgba(248, 113, 113, 0.6);
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}
body.night-mode .modal-footer {
  background: transparent !important;
}
body.night-mode .modal-body .form-label {
  color: rgba(255, 255, 255, 0.75);
}
body.night-mode .modal-body .form-group:focus-within .form-label {
  color: #f87171;
}
body.night-mode .modal-body .form-label .required {
  color: #f87171;
}
body.night-mode .modal-body .form-input,
body.night-mode .modal-body .form-textarea,
body.night-mode .modal-body select.form-input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
}
body.night-mode .modal-body .form-textarea:hover,
body.night-mode .modal-body .form-input:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}
body.night-mode .modal-body .form-input:focus,
body.night-mode .modal-body .form-textarea:focus {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18), var(--shadow-lg);
}
body.night-mode .modal-body .form-input::placeholder,
body.night-mode .modal-body .form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
body.night-mode .modal-body select.form-input option {
  background: rgba(38, 36, 36, 1);
  color: rgba(255, 255, 255, 0.95);
}
