/* Error & Alert Styles */

/* Error container */
.error-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9998;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* Alert styles */
.alert {
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  background-color: #f8f9fa;
  border-left: 4px solid #dee2e6;
  animation: slideIn 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
}

.alert-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.alert-message {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.alert-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.alert-close:hover {
  opacity: 1;
}

/* Alert types */
.alert-error {
  background-color: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border-left-color: #ffc107;
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  border-left-color: #17a2b8;
  color: #0c5460;
}

.alert-success {
  background-color: #d4edda;
  border-left-color: #28a745;
  color: #155724;
}

/* Field errors */
.field-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #dc3545;
  font-weight: 500;
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
  border-color: #dc3545 !important;
  background-color: #fff5f5;
}

/* System status banner */
.system-status {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 15px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  z-index: 9999;
  display: none;
}

.system-status--ok {
  background-color: #d4edda;
  color: #155724;
}

.system-status--warning {
  background-color: #fff3cd;
  color: #856404;
}

.system-status--error {
  background-color: #f8d7da;
  color: #721c24;
}
.form-group input.error:focus,
.form-group textarea.error:focus,
.form-group select.error:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Fade out animation */
.alert.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .error-container {
    left: 10px;
    right: 10px;
    max-width: none;
    top: 10px;
  }

  .alert {
    padding: 12px;
  }

  .alert-message {
    font-size: 13px;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

/* Modal Overlay & Confirmation Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

.confirmation-modal {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #0B1F3B 0%, #1a3a5c 100%);
  color: white;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
  line-height: 1.6;
}

.modal-body p {
  margin: 8px 0;
  font-size: 14px;
  color: #333;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: #f8f9fa;
}

.modal-confirm-btn {
  padding: 10px 24px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-confirm-btn:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.modal-confirm-btn:active {
  transform: translateY(0);
}

/* Modal animations */
@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Fade in animation for modal overlay */
@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .confirmation-modal {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 16px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .modal-body p {
    font-size: 13px;
  }
}
