/* SimCzech Aircraft Comparator v37 — Enhanced Styles */

/* ─── Page Layout ─── */
.sc-aircraft-comparator { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.sc-aircraft-comparator h1 { color: #d4a843; margin-bottom: 0.5rem; }
.sc-aircraft-comparator > .sc-comp-header p { color: #9ca3af; margin-bottom: 1.5rem; }

/* ─── Category Filters ─── */
.sc-comp-categories {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.sc-comp-cat-header {
  color: #d4a843;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.875rem;
}
.sc-comp-cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.sc-comp-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #d1d5db;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sc-comp-cat-btn:hover {
  border-color: var(--cat-color, #9ca3af);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}
.sc-comp-cat-btn.active {
  background: var(--cat-color, #d4a843);
  border-color: var(--cat-color, #d4a843);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}
.sc-comp-cat-icon { font-size: 1.125rem; line-height: 1; }
.sc-comp-cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.375rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
}
.sc-comp-cat-btn.active .sc-comp-cat-count { background: rgba(255, 255, 255, 0.2); }

/* ─── Selection Section ─── */
.sc-comp-selector-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.sc-comp-selector-header {
  color: #9ca3af;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

/* ─── Dropdown ─── */
.sc-comp-dropdown-wrap { position: relative; margin-bottom: 0.75rem; }
#sc-comp-dropdown {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  background: #1f2937;
  border: 2px solid rgba(212, 168, 67, 0.3);
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 0.9375rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-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'%3E%3Cpath fill='%23d4a843' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 12px;
}
#sc-comp-dropdown:hover { border-color: rgba(212, 168, 67, 0.6); }
#sc-comp-dropdown:focus { outline: none; border-color: #d4a843; box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15); }
#sc-comp-dropdown optgroup { background: #111827; color: #d4a843; font-weight: 600; }
#sc-comp-dropdown option { background: #1f2937; color: #e5e7eb; }

/* ─── Search Input ─── */
.sc-comp-search-wrap { position: relative; }
.sc-comp-search-row { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
#sc-comp-search {
  flex: 1;
  padding: 0.75rem 1rem;
  background: #1f2937;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}
#sc-comp-search:focus { outline: none; border-color: #d4a843; box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.12); }
#sc-comp-search::placeholder { color: #6b7280; }

/* ─── Suggestions ─── */
#sc-comp-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1f2937;
  border: 2px solid rgba(212, 168, 67, 0.3);
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.sc-comp-suggestion {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #d1d5db;
  font-size: 0.875rem;
}
.sc-comp-suggestion:last-child { border-bottom: none; }
.sc-comp-suggestion:hover { background: rgba(212, 168, 67, 0.12); }
.sc-comp-sug-icon { font-size: 1.25rem; line-height: 1; flex-shrink: 0; }
.sc-comp-suggestion strong { color: #d4a843; }

/* ─── Selected Slots ─── */
#sc-comp-slots, .sc-comp-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1rem;
  min-height: 48px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  border: 2px dashed rgba(212, 168, 67, 0.2);
}
.sc-comp-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 0.8125rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sc-comp-slot-icon { font-size: 1.125rem; line-height: 1; }
.sc-comp-slot-text { display: flex; align-items: center; gap: 0.375rem; }
.sc-comp-slot-text strong { font-weight: 700; color: #d4a843; }
.sc-comp-slot-text small { color: #9ca3af; font-size: 0.75rem; }
.sc-comp-slot-rm {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  border: none;
  color: #f87171;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.375rem;
  padding: 0;
}
.sc-comp-slot-rm:hover { background: rgba(239, 68, 68, 0.6); color: #fff; transform: scale(1.1); }

/* ─── Add Button ─── */
.sc-comp-add-btn, #sc-comp-add-btn {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #d4a843 0%, #b8922d 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 12px rgba(212, 168, 67, 0.3);
  white-space: nowrap;
}
.sc-comp-add-btn:hover:not(:disabled), #sc-comp-add-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(212, 168, 67, 0.4);
}
.sc-comp-add-btn:disabled, #sc-comp-add-btn:disabled {
  background: #4b5563;
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

/* ─── Comparison Table ─── */
.sc-comp-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
}
.sc-comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.sc-comp-table thead th {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #d4a843;
  font-weight: 600;
  padding: 0.875rem;
  text-align: left;
  border-bottom: 2px solid rgba(212, 168, 67, 0.4);
  position: sticky;
  top: 0;
  z-index: 10;
}
.sc-comp-table tbody tr { border-bottom: 1px solid rgba(255, 255, 255, 0.04); transition: background 0.15s; }
.sc-comp-table tbody tr:hover { background: rgba(212, 168, 67, 0.04); }
.sc-comp-table td { padding: 0.75rem 0.875rem; color: #d1d5db; }
.sc-comp-label { font-weight: 600; color: #9ca3af; white-space: nowrap; }
.sc-comp-value { text-align: center; }
.sc-comp-max { background: rgba(16, 185, 129, 0.15); font-weight: 700; color: #34d399; }
.sc-comp-min { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.sc-comp-aircraft-col { text-align: center; min-width: 140px; }
.sc-comp-aircraft-col small { display: block; font-size: 0.6875rem; color: #9ca3af; font-weight: 400; margin-top: 0.125rem; }

/* ─── Hints & Loading ─── */
.sc-comp-hint { color: #6b7280; text-align: center; padding: 2.5rem 1rem; font-size: 0.9375rem; }
.sc-comp-loading { color: #d4a843; text-align: center; padding: 2.5rem 1rem; font-size: 0.9375rem; font-weight: 600; }

/* ─── Shake Animation ─── */
@keyframes sc-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.sc-shake { animation: sc-shake 0.3s ease; border-color: #ef4444 !important; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .sc-comp-cat-filters { gap: 0.375rem; }
  .sc-comp-cat-btn { padding: 0.375rem 0.625rem; font-size: 0.75rem; }
  .sc-comp-search-row { flex-direction: column; }
  .sc-comp-slot { font-size: 0.75rem; padding: 0.5rem 0.75rem; }
  .sc-comp-table { font-size: 0.75rem; }
  .sc-comp-table th, .sc-comp-table td { padding: 0.625rem 0.5rem; }
}