/**
 * Error Modal Component Styles
 * Lightweight modal for displaying validation errors inline
 * Part of the Kemoja feedback system (Option B implementation)
 */

/* Modal Overlay */
.error-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  animation: fadeIn 0.2s ease-in;
}

.error-modal-overlay.active {
  display: block;
}

/* Modal Container */
.error-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 9999;
  animation: slideDown 0.3s ease-out;
}

.error-modal.active {
  display: block;
}

/* Modal Header */
.error-modal-header {
  background-color: #dc3545;
  color: #ffffff;
  padding: 20px 24px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.error-modal-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 16px;
  flex-shrink: 0;
}

.error-modal-icon::before {
  content: "⚠";
}

.error-modal-title-wrapper {
  flex: 1;
}

.error-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.error-modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.error-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.error-modal-close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Modal Body */
.error-modal-body {
  padding: 24px;
}

.error-modal-message {
  font-size: 15px;
  color: #333333;
  margin-bottom: 16px;
  line-height: 1.5;
}

.error-modal-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.error-modal-list li {
  padding: 12px 16px;
  margin-bottom: 8px;
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
  border-radius: 4px;
  color: #721c24;
  font-size: 14px;
  line-height: 1.5;
}

.error-modal-list li::before {
  content: "• ";
  color: #dc3545;
  font-weight: bold;
  margin-right: 8px;
}

/* Modal Footer */
.error-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.error-modal-button {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Ubuntu", sans-serif;
}

.error-modal-button-primary {
  background-color: #dc3545;
  color: #ffffff;
}

.error-modal-button-primary:hover {
  background-color: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.error-modal-button-primary:active {
  transform: translateY(0);
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .error-modal {
    width: 95%;
    max-height: 90vh;
  }

  .error-modal-header {
    padding: 16px 20px;
  }

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

  .error-modal-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin-right: 12px;
  }

  .error-modal-body {
    padding: 20px;
  }

  .error-modal-footer {
    padding: 12px 20px;
  }

  .error-modal-list li {
    font-size: 13px;
    padding: 10px 12px;
  }
}

/* Accessibility */
.error-modal:focus {
  outline: none;
}

/* Print styles */
@media print {
  .error-modal-overlay,
  .error-modal {
    display: none !important;
  }
}
