/* Feedback Panel Styles */

.feedback-toggle-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  line-height: 1;
  padding: 0;
}

.feedback-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.feedback-toggle-btn.active {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.feedback-panel {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--outline);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  overflow: hidden;
}

.feedback-panel.open {
  right: 0;
}

.feedback-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--outline);
  flex-shrink: 0;
}

.feedback-panel-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--on-surface);
}

.feedback-close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--on-surface-variant);
  cursor: pointer;
  padding: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -0.5rem -0.5rem 0 0;
  transition: color 0.2s;
}

.feedback-close-btn:hover {
  color: var(--on-surface);
}

.feedback-form {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feedback-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feedback-form label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--on-surface);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feedback-form select,
.feedback-form input[type="text"],
.feedback-form input[type="email"],
.feedback-form textarea {
  padding: 0.75rem;
  border: 1px solid var(--outline);
  border-radius: 0.25rem;
  background: var(--surface-container);
  color: var(--on-surface);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, background-color 0.2s;
}

.feedback-form select:focus,
.feedback-form input:focus,
.feedback-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.feedback-form textarea {
  resize: none;
  font-family: inherit;
}

.feedback-form small {
  font-size: 0.75rem;
  color: var(--on-surface-variant);
}

.char-counter {
  display: block;
  text-align: right;
  margin-top: 0.25rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.form-actions button {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-actions .btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.form-actions .btn-primary:hover {
  opacity: 0.9;
}

.form-actions .btn-primary:active {
  transform: scale(0.98);
}

.form-actions .btn-secondary {
  background: var(--outline);
  color: var(--on-surface);
}

.form-actions .btn-secondary:hover {
  background: var(--outline-variant);
}

.feedback-status {
  padding: 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  text-align: center;
  margin-top: 1rem;
}

.feedback-status-loading {
  background: rgba(66, 133, 244, 0.1);
  color: #4285f4;
}

.feedback-status-success {
  background: rgba(76, 175, 80, 0.1);
  color: #388e3c;
}

.feedback-status-error {
  background: rgba(255, 0, 0, 0.1);
  color: #d32f2f;
}

/* Overlay when panel is open */
.feedback-panel.open::before {
  content: '';
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .feedback-panel {
    width: 100%;
    right: -100%;
  }

  .feedback-toggle-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .feedback-panel-header {
    padding: 1rem;
  }

  .feedback-form {
    padding: 1rem;
    gap: 1rem;
  }
}
