/* FEEDBACK VIEW — PREMIUM REDESIGN */

#feedbackView {
  --fbv-primary: #7c3aed;
  --fbv-primary-hover: #6d28d9;
  --fbv-primary-light: rgba(124, 58, 237, 0.08);
  --fbv-surface: #ffffff;
  --fbv-surface-alt: #f8fafc;
  --fbv-border: #e2e8f0;
  --fbv-text-main: #0f172a;
  --fbv-text-sec: #64748b;
  --fbv-text-hint: #94a3b8;
  --fbv-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --fbv-radius-lg: 20px;
  --fbv-radius-md: 14px;
}

[data-theme="dark"] #feedbackView,
html:not([data-theme="light"]) #feedbackView {
  --fbv-primary: #a78bfa;
  --fbv-primary-hover: #c4b5fd;
  --fbv-primary-light: rgba(167, 139, 250, 0.14);
  --fbv-surface: rgba(255, 255, 255, 0.04);
  --fbv-surface-alt: rgba(255, 255, 255, 0.07);
  --fbv-border: rgba(255, 255, 255, 0.09);
  --fbv-text-main: #f1f5f9;
  --fbv-text-sec: rgba(241, 245, 249, 0.62);
  --fbv-text-hint: rgba(241, 245, 249, 0.4);
  --fbv-shadow: 0 4px 20px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.1);
}

#feedbackView .fbv-shell {
  max-width: 680px !important;
  margin: 0 auto !important;
  padding: 48px 24px 80px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 40px !important;
}

/* Header with Icon */
#feedbackView .fbv-header-wrapper {
  display: flex !important;
  justify-content: center !important;
  text-align: center !important;
}

#feedbackView .fbv-hero-block {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 16px !important;
  max-width: 500px !important;
}

#feedbackView .fbv-icon-glow {
  width: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
  background: var(--fbv-primary-light) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--fbv-primary) !important;
  box-shadow: 0 0 40px rgba(167, 139, 250, 0.35), 0 4px 14px rgba(167, 139, 250, 0.18) !important;
  position: relative !important;
}

#feedbackView .fbv-icon-glow::after {
  content: '' !important;
  position: absolute !important;
  inset: -1px !important;
  border-radius: inherit !important;
  padding: 1px !important;
  background: linear-gradient(135deg, var(--fbv-primary), transparent 60%) !important;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask-composite: exclude !important;
  opacity: 0.3 !important;
}

#feedbackView .fbv-head {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

#feedbackView .fbv-title {
  font-size: 28px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  margin: 0 !important;
  color: var(--fbv-text-main) !important;
  background: none !important;
  background-clip: initial !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: var(--fbv-text-main) !important;
  text-fill-color: var(--fbv-text-main) !important;
}

#feedbackView .fbv-subtitle {
  font-size: 15px !important;
  color: var(--fbv-text-sec) !important;
  margin: 0 !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
}

/* Compose Area */
#feedbackView .fbv-compose-block {
  position: relative !important;
  border-radius: var(--fbv-radius-lg) !important;
  background: var(--fbv-surface) !important;
  border: 1px solid var(--fbv-border) !important;
  box-shadow: var(--fbv-shadow) !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

#feedbackView .fbv-compose-block:focus-within {
  border-color: var(--fbv-primary) !important;
  box-shadow: 0 0 0 3px var(--fbv-primary-light), var(--fbv-shadow) !important;
}

#feedbackView .fbv-input {
  width: 100% !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: var(--fbv-text-main) !important;
  font-family: inherit !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  resize: vertical !important;
  min-height: 120px !important;
  max-height: 400px !important;
}

#feedbackView .fbv-input:focus {
  outline: none !important;
}

#feedbackView .fbv-input::placeholder {
  color: var(--fbv-text-hint) !important;
}

#feedbackView .fbv-action-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-top: 16px !important;
  border-top: 1px solid var(--fbv-border) !important;
  gap: 16px !important;
}

#feedbackView .fbv-compose-hint {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  color: var(--fbv-text-hint) !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

#feedbackView .fbv-compose-hint kbd {
  display: inline-block !important;
  padding: 1px 6px !important;
  border-radius: 5px !important;
  background: var(--fbv-surface-alt) !important;
  border: 1px solid var(--fbv-border) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 11px !important;
  color: var(--fbv-text-sec) !important;
  line-height: 1.2 !important;
}

/* Send button */
#feedbackView .fbv-send,
#feedbackView #submitFeedbackPageBtn {
  appearance: none !important;
  border: none !important;
  background: var(--fbv-primary) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 12px 24px !important;
  border-radius: var(--fbv-radius-md) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#feedbackView .fbv-send:hover,
#feedbackView #submitFeedbackPageBtn:hover {
  background: var(--fbv-primary-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px var(--fbv-primary-light) !important;
}

#feedbackView .fbv-send:active,
#feedbackView #submitFeedbackPageBtn:active {
  transform: scale(0.97) !important;
}

#feedbackView .fbv-send:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* History section */
#feedbackView .fbv-history {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

#feedbackView .fbv-history-header {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

#feedbackView .fbv-history-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--fbv-text-sec) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

#feedbackView .fbv-history-line {
  flex: 1 !important;
  height: 1px !important;
  background: var(--fbv-border) !important;
}

#feedbackView .fbv-history-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

/* History cards */
#feedbackView .fbv-item {
  padding: 24px !important;
  border-radius: var(--fbv-radius-lg) !important;
  background: var(--fbv-surface) !important;
  border: 1px solid var(--fbv-border) !important;
  box-shadow: var(--fbv-shadow) !important;
  transition: all 0.2s ease !important;
  animation: fbv-fade 0.3s ease-out !important;
}

#feedbackView .fbv-item:hover {
  border-color: var(--fbv-primary) !important;
  transform: translateY(-2px) !important;
}

#feedbackView .fbv-item-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
}

#feedbackView .fbv-item-date {
  font-size: 13px !important;
  color: var(--fbv-text-sec) !important;
  font-weight: 500 !important;
}

/* Status pills */
#feedbackView .fbv-item-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  letter-spacing: 0.02em !important;
}

#feedbackView .fbv-item-status::before {
  content: "" !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: currentColor !important;
}

#feedbackView .fbv-item-status[data-s="new"] {
  background: var(--fbv-primary-light) !important;
  color: var(--fbv-primary) !important;
}

#feedbackView .fbv-item-status[data-s="replied"] {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
}

[data-theme="dark"] #feedbackView .fbv-item-status[data-s="replied"],
html:not([data-theme="light"]) #feedbackView .fbv-item-status[data-s="replied"] {
  color: #34d399 !important;
}

/* Message text */
#feedbackView .fbv-item-msg {
  font-size: 16px !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
  color: var(--fbv-text-main) !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

/* Reply block */
#feedbackView .fbv-item-reply {
  margin-top: 16px !important;
  padding: 16px 20px !important;
  border-radius: var(--fbv-radius-md) !important;
  background: var(--fbv-surface-alt) !important;
  border-left: 4px solid var(--fbv-primary) !important;
}

#feedbackView .fbv-item-reply-label {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: var(--fbv-primary) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 8px !important;
}

#feedbackView .fbv-item-reply-label::before {
  content: '' !important;
  display: inline-block !important;
  width: 14px !important;
  height: 14px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'%3E%3C/path%3E%3C/svg%3E") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
}

#feedbackView .fbv-item-reply-text {
  font-size: 15px !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
  color: var(--fbv-text-main) !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

/* Empty state */
#feedbackView .fbv-empty {
  padding: 60px 20px !important;
  text-align: center !important;
  color: var(--fbv-text-hint) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 16px !important;
}

#feedbackView .fbv-empty-icon-wrap {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  background: var(--fbv-surface) !important;
  border: 1px solid var(--fbv-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: var(--fbv-shadow) !important;
  color: var(--fbv-text-sec) !important;
}

#feedbackView .fbv-empty span {
  font-size: 15px !important;
  line-height: 1.5 !important;
  max-width: 260px !important;
}

/* Animation */
@keyframes fbv-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 600px) {
  #feedbackView .fbv-shell {
    padding: 32px 16px 80px !important;
    gap: 32px !important;
  }

  #feedbackView .fbv-action-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #feedbackView .fbv-compose-hint {
    justify-content: center !important;
    order: 2 !important;
    margin-top: 8px !important;
  }

  #feedbackView .fbv-send {
    order: 1 !important;
  }
}