/* === 10x Security Support — styles === */

html, body { -webkit-tap-highlight-color: transparent; }

/* Animated background logo watermark */
.bg-watermark {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bg-watermark img {
  width: 140%;
  max-width: 1200px;
  opacity: 0.04;
  filter: grayscale(100%) brightness(2);
  animation: watermark-drift 30s ease-in-out infinite alternate;
}
@keyframes watermark-drift {
  0%   { transform: translate(-2%, -1%) scale(1); }
  100% { transform: translate(2%, 1%) scale(1.05); }
}

.bg-gradient-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 77, 26, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(255, 179, 0, 0.06) 0%, transparent 45%),
    linear-gradient(to bottom, rgba(5,7,13,0.3) 0%, rgba(5,7,13,0.85) 100%);
}

/* Logo badge (makes a logo-on-white look intentional) */
.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}
.logo-badge img {
  height: 2.75rem;
  width: auto;
  display: block;
}

/* Glass card */
.glass-card {
  background: rgba(17, 23, 39, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 1rem;
  box-shadow:
    0 10px 40px -10px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

/* Form fields */
.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.field-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.625rem;
  padding: 0.75rem 0.875rem;
  font-size: 1rem;
  color: #f1f5f9;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field-input::placeholder { color: #64748b; }
.field-input:focus {
  outline: none;
  border-color: #ff4d1a;
  box-shadow: 0 0 0 3px rgba(255, 77, 26, 0.15);
  background: rgba(15, 23, 42, 0.85);
}
.field-input:invalid:not(:placeholder-shown) {
  border-color: rgba(239, 68, 68, 0.6);
}

/* Chips (category) */
.chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.chip:hover {
  border-color: rgba(255, 77, 26, 0.4);
  color: #f1f5f9;
}
.chip.active {
  background: rgba(255, 77, 26, 0.15);
  border-color: #ff4d1a;
  color: #ffb380;
}

/* Urgency chips */
.chip-urgency {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  padding: 0.625rem 0.5rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.chip-urgency:hover { border-color: rgba(148, 163, 184, 0.4); }
.chip-urgency .dot {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  box-shadow: 0 0 10px currentColor;
}
.chip-urgency.active {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
  color: #f8fafc;
}
.chip-urgency[data-value="high"].active { border-color: rgba(239, 68, 68, 0.7); }
.chip-urgency[data-value="medium"].active { border-color: rgba(245, 158, 11, 0.7); }
.chip-urgency[data-value="low"].active { border-color: rgba(52, 211, 153, 0.7); }

/* Mode toggle (issue vs equipment) */
.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 0;
  color: #94a3b8;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.mode-btn:hover { color: #f1f5f9; background: rgba(148, 163, 184, 0.05); }
.mode-btn.active {
  background: rgba(255, 77, 26, 0.15);
  color: #ffd4b8;
  box-shadow: 0 0 0 1px rgba(255, 77, 26, 0.4) inset;
}

/* Equipment picker */
.equipment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.eq-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.eq-item:hover {
  border-color: rgba(255, 77, 26, 0.3);
  background: rgba(15, 23, 42, 0.7);
}
.eq-item.selected {
  border-color: #ff4d1a;
  background: rgba(255, 77, 26, 0.08);
}
.eq-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 77, 26, 0.12);
  border: 1px solid rgba(255, 77, 26, 0.25);
  font-size: 18px;
  flex-shrink: 0;
}
.eq-item.selected .eq-icon {
  background: rgba(255, 77, 26, 0.25);
  border-color: rgba(255, 77, 26, 0.5);
}
.eq-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.eq-label {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.2;
}
.eq-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}
.eq-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}
.eq-qty[hidden] { display: none; }
.eq-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.eq-qty-btn:hover { border-color: #ff4d1a; color: #fff; }
.eq-qty-input {
  width: 38px;
  height: 28px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  text-align: center;
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  -moz-appearance: textfield;
}
.eq-qty-input::-webkit-outer-spin-button,
.eq-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.eq-checkmark {
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ff4d1a;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
}
.eq-item.selected .eq-checkmark { display: inline-flex; }

/* Photo preview thumbnails */
.photo-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #0f172a;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-thumb .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: none;
  cursor: pointer;
}
.photo-thumb .remove-btn:hover { background: rgba(239, 68, 68, 0.9); }

/* Form message banners */
#form-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
#form-message.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #86efac;
}

/* Chatbot messages */
.chat-msg {
  display: flex;
  gap: 0.5rem;
  animation: msg-in 0.2s ease-out;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot .bubble {
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.chat-msg.user { justify-content: flex-end; }
.chat-msg.user .bubble {
  background: rgba(255, 77, 26, 0.15);
  color: #ffd4b8;
  border: 1px solid rgba(255, 77, 26, 0.3);
}
.bubble {
  max-width: 80%;
  padding: 0.625rem 0.875rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.bubble ul, .bubble ol { margin: 0.35rem 0 0 1.25rem; padding: 0; }
.bubble ul { list-style: disc outside; }
.bubble ol { list-style: decimal outside; }
.bubble li { margin: 0.15rem 0; padding-left: 0.15rem; }
.bubble strong { color: #fff; }

.suggestion-chip {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s;
}
.suggestion-chip:hover {
  border-color: rgba(255, 77, 26, 0.5);
  color: #f1f5f9;
}

/* Loader dots */
.loading-dots {
  display: inline-flex;
  gap: 3px;
}
.loading-dots span {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 999px;
  animation: dot-pulse 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot-pulse {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1; transform: translateY(-3px); }
}

/* Chat panel responsive */
#chat-panel.open { display: flex !important; }
@media (max-width: 639px) {
  #chat-panel .glass-card { border-radius: 0; }
}
