/* ===== FEEDBACK PAGE CUSTOM STYLES ===== */

.feedback-page {
  padding: 8rem 2rem 4rem;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Ambient Animated Star Backgrounds matching hero style */
.feedback-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.feedback-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.feedback-header {
  text-align: center;
  margin-bottom: 3rem;
}

.feedback-header h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 2.75rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.feedback-header .subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Form Glass Card Wrapper */
.feedback-card-wrapper {
  background: rgba(26, 26, 62, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feedback-card-wrapper:hover {
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.45);
}

/* Session Notice Banner */
.session-notice {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.4;
}

.session-notice.guest {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.session-notice.guest a {
  color: #fbbf24;
  text-decoration: underline;
  font-weight: 600;
}

.session-notice.authenticated {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.session-notice.authenticated i {
  color: #22c55e;
}

/* Feedback Form Elements */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.field-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.char-counter {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Interactive Feedback Type Selection Cards */
.feedback-type-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.type-card {
  background: var(--dark-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.type-card:hover,
.type-card:focus {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.type-card:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.type-card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  font-size: 1.25rem;
  color: var(--card-color);
  transition: all 0.25s ease;
}

.type-card .card-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  transition: all 0.25s ease;
}

/* Card Selection Colors & Gradients */
.type-card.selected {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--primary-light);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}

.type-card.selected[data-value="Suggestion"] {
  background: rgba(251, 191, 36, 0.1);
  border-color: #fbbf24;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.type-card.selected[data-value="Bug Report"] {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.type-card.selected[data-value="Feature Request"] {
  background: rgba(6, 182, 212, 0.1);
  border-color: #06b6d4;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.type-card.selected[data-value="General Feedback"] {
  background: rgba(167, 139, 250, 0.1);
  border-color: #a78bfa;
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.2);
}

.type-card.selected .card-icon {
  background: var(--card-color);
  color: #000000;
  transform: scale(1.1);
}

.type-card.selected .card-label {
  color: var(--text-primary);
}

/* Inputs & Textareas with integrated Icons */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input,
.input-wrapper textarea {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--dark-card);
  color: var(--text-primary);
  font: inherit;
  outline: none;
  transition: all 0.25s ease;
}

.input-wrapper input {
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  height: 48px;
}

.input-wrapper textarea {
  padding: 1rem 1rem 1rem 2.75rem;
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

.field-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.25s ease;
}

.textarea-icon {
  top: 1.15rem;
}

.input-wrapper input:focus,
.input-wrapper textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
  background: rgba(37, 37, 80, 0.7);
}

.input-wrapper input:focus + .field-icon,
.input-wrapper textarea:focus + .field-icon {
  color: var(--primary-light);
}

/* Form Validation & Error States */
.error-message {
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  animation: slideDown 0.2s ease;
}

.error-message::before {
  content: "\f071";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.form-group.invalid input,
.form-group.invalid textarea,
.form-group.invalid .type-card {
  border-color: #ef4444 !important;
}

.form-group.invalid .error-message {
  display: flex;
}

/* Submit Button Loading Integrations */
.submit-btn {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 600;
  gap: 0.75rem;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.submit-btn .btn-loader {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Form submission alerts */
.form-submit-message {
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.form-submit-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Success Modal Overlay & Animations */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.success-modal {
  max-width: 480px;
  width: 100%;
  padding: 3rem 2rem;
  border-radius: 24px;
  text-align: center;
  background: rgba(26, 26, 62, 0.8);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transform: scale(0.9);
  animation: scaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.success-icon-wrapper {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.success-icon-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.25rem;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
  animation: checkRotate 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s forwards;
}

.success-modal h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #4ade80, #00f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.success-modal p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.success-modal button {
  width: 100%;
}

/* Light Mode Support */
body.light-mode .feedback-card-wrapper {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .type-card {
  background: #f3f4f6;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .type-card:hover {
  background: #e5e7eb;
}

body.light-mode .type-card .card-label {
  color: #4b5563;
}

body.light-mode .type-card.selected {
  background: rgba(124, 58, 237, 0.08);
  border-color: var(--primary);
}

body.light-mode .type-card.selected[data-value="Suggestion"] {
  background: rgba(251, 191, 36, 0.08);
  border-color: #d97706;
}

body.light-mode .type-card.selected[data-value="Bug Report"] {
  background: rgba(239, 68, 68, 0.08);
  border-color: #dc2626;
}

body.light-mode .type-card.selected[data-value="Feature Request"] {
  background: rgba(6, 182, 212, 0.08);
  border-color: #0891b2;
}

body.light-mode .type-card.selected[data-value="General Feedback"] {
  background: rgba(167, 139, 250, 0.08);
  border-color: #7c3aed;
}

body.light-mode .type-card.selected .card-label {
  color: #1f2937;
}

body.light-mode .input-wrapper input,
body.light-mode .input-wrapper textarea {
  background: #f9fafb;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

body.light-mode .input-wrapper input:focus,
body.light-mode .input-wrapper textarea:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

body.light-mode .success-modal {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .success-modal p {
  color: #4b5563;
}

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

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

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes checkRotate {
  from {
    transform: scale(0.5) rotate(-45deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

/* Responsiveness settings */
@media (max-width: 768px) {
  .feedback-page {
    padding: 7rem 1rem 3rem;
  }

  .feedback-header h1 {
    font-size: 2.25rem;
  }

  .feedback-card-wrapper {
    padding: 1.75rem;
    border-radius: 20px;
  }

  .feedback-type-selector {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .type-card {
    padding: 1.25rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .feedback-type-selector {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}
