/**
 * Accessible Feedback System Styles
 * Supports inline messages, modals, and screen reader announcements
 */

/* ===== Inline Feedback ===== */
.feedback-inline {
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  animation: slideDown 0.3s ease-out;
  border-left: 4px solid;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback-success {
  background-color: #f0fdf4;
  color: #166534;
  border-left-color: #22c55e;
}

.feedback-error {
  background-color: #fef2f2;
  color: #991b1b;
  border-left-color: #ef4444;
}

.feedback-warning {
  background-color: #fffbeb;
  color: #92400e;
  border-left-color: #f59e0b;
}

.feedback-info {
  background-color: #f0f9ff;
  color: #0c2340;
  border-left-color: #3b82f6;
}

/* ===== Modal Dialog ===== */
.feedback-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}

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

.feedback-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.feedback-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  border-top: 4px solid;
}

.feedback-modal-error .feedback-modal-content {
  border-top-color: #ef4444;
}

.feedback-modal-warning .feedback-modal-content {
  border-top-color: #f59e0b;
}

.feedback-modal-info .feedback-modal-content {
  border-top-color: #3b82f6;
}

.feedback-modal-title {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  color: #121212;
}

.feedback-modal-message {
  margin: 0 0 24px 0;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.feedback-modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.feedback-modal-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #121212;
  cursor: pointer;
  transition: all 0.2s;
}

.feedback-modal-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

.feedback-modal-btn:focus {
  outline: 2px solid #121212;
  outline-offset: 2px;
}

.feedback-modal-btn-primary {
  background: #121212;
  color: white;
  border-color: #121212;
}

.feedback-modal-btn-primary:hover {
  background: #333;
  border-color: #333;
}

.feedback-modal-btn-primary:focus {
  outline-color: white;
}

/* ===== Screen Reader Only ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .feedback-modal-content {
    padding: 24px;
  }

  .feedback-modal-title {
    font-size: 18px;
  }

  .feedback-modal-buttons {
    flex-direction: column;
  }

  .feedback-modal-btn {
    width: 100%;
  }
}