/* File: src/css/components/notifications.css */
/* Notification/Toast System */

#notification-container {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  position: relative;
  background: white;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  animation: notificationSlideIn 0.3s ease-out forwards;
  animation-fill-mode: both;
  opacity: 1;
  transform: translateX(0);
}

.notification.removing {
  animation: notificationSlideOut 0.3s ease-out forwards;
}

@keyframes notificationSlideIn {
  from {
    transform: translateX(calc(100% + 20px));
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes notificationSlideOut {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateX(calc(100% + 20px)) scale(0.95);
    opacity: 0;
  }
}

.notification-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px 0;
  color: #1f2937;
}

.notification-message {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 8px 0;
  line-height: 1.5;
  word-wrap: break-word;
}

.notification-report-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  margin-top: 4px;
}

.notification-report-btn:hover:not(:disabled) {
  background: #dc2626;
}

.notification-report-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.notification-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 18px;
  line-height: 1;
}

.notification-close:hover {
  background: #f3f4f6;
  color: #4b5563;
}

/* Success notification */
.notification.success {
  border-right: 4px solid #10b981;
}

.notification.success .notification-icon {
  background: #d1fae5;
  color: #10b981;
}

/* Error notification */
.notification.error {
  border-right: 4px solid #ef4444;
}

.notification.error .notification-icon {
  background: #fee2e2;
  color: #ef4444;
}

/* Warning notification */
.notification.warning {
  border-right: 4px solid #f59e0b;
}

.notification.warning .notification-icon {
  background: #fef3c7;
  color: #f59e0b;
}

/* Info notification */
.notification.info {
  border-right: 4px solid #3b82f6;
}

.notification.info .notification-icon {
  background: #dbeafe;
  color: #3b82f6;
}

/* Progress bar for auto-dismiss */
.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  transform-origin: left;
  animation: notificationProgress linear forwards;
}

@keyframes notificationProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.notification.success .notification-progress {
  color: #10b981;
}

.notification.error .notification-progress {
  color: #ef4444;
}

.notification.warning .notification-progress {
  color: #f59e0b;
}

.notification.info .notification-progress {
  color: #3b82f6;
}

/* Mobile responsive */
@media (max-width: 640px) {
  #notification-container {
    right: 10px !important;
    left: 10px !important;
    max-width: none;
  }

  .notification {
    min-width: auto;
    max-width: none;
  }
}

/* RTL support */
[dir="rtl"] #notification-container {
  right: auto !important;
  left: 20px !important;
}

[dir="rtl"] .notification {
  border-right: none;
  border-left: 4px solid;
}

[dir="rtl"] .notification.success {
  border-left-color: #10b981;
}

[dir="rtl"] .notification.error {
  border-left-color: #ef4444;
}

[dir="rtl"] .notification.warning {
  border-left-color: #f59e0b;
}

[dir="rtl"] .notification.info {
  border-left-color: #3b82f6;
}

@media (max-width: 640px) {
  [dir="rtl"] #notification-container {
    left: 10px !important;
    right: 10px !important;
  }
}

/* ================================================
   Confirmation Modal Styles
   ================================================ */

.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
  padding: 20px;
  animation: confirmOverlayFadeIn 0.2s ease-out forwards;
}

.confirm-modal-overlay.removing {
  animation: confirmOverlayFadeOut 0.2s ease-out forwards;
}

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

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

.confirm-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 100%;
  overflow: hidden;
  animation: confirmModalSlideIn 0.2s ease-out forwards;
}

.confirm-modal-overlay.removing .confirm-modal {
  animation: confirmModalSlideOut 0.2s ease-out forwards;
}

@keyframes confirmModalSlideIn {
  from {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes confirmModalSlideOut {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
}

.confirm-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.confirm-modal-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.confirm-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.confirm-modal-body {
  padding: 20px 24px;
}

.confirm-modal-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  white-space: pre-wrap;
}

.confirm-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px 20px;
  background: #f9fafb;
  justify-content: flex-end;
}

.confirm-modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  min-width: 80px;
}

.confirm-modal-btn.cancel {
  background: #e5e7eb;
  color: #4b5563;
}

.confirm-modal-btn.cancel:hover {
  background: #d1d5db;
}

.confirm-modal-btn.confirm {
  background: #3b82f6;
  color: white;
}

.confirm-modal-btn.confirm:hover {
  background: #2563eb;
}

.confirm-modal-btn.confirm:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.confirm-modal-btn.cancel:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.3);
}

/* Warning type */
.confirm-modal.warning .confirm-modal-btn.confirm {
  background: #f59e0b;
}

.confirm-modal.warning .confirm-modal-btn.confirm:hover {
  background: #d97706;
}

.confirm-modal.warning .confirm-modal-btn.confirm:focus {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

/* Danger type */
.confirm-modal.danger .confirm-modal-btn.confirm {
  background: #ef4444;
}

.confirm-modal.danger .confirm-modal-btn.confirm:hover {
  background: #dc2626;
}

.confirm-modal.danger .confirm-modal-btn.confirm:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

/* Alert modal specific (single button) */
.alert-modal .confirm-modal-footer {
  justify-content: center;
}

/* Alert type colors */
.alert-modal.error .confirm-modal-header {
  background: #fef2f2;
}

.alert-modal.error .confirm-modal-icon {
  color: #ef4444;
}

.alert-modal.error .confirm-modal-btn.confirm {
  background: #ef4444;
}

.alert-modal.error .confirm-modal-btn.confirm:hover {
  background: #dc2626;
}

.alert-modal.warning .confirm-modal-header {
  background: #fffbeb;
}

.alert-modal.warning .confirm-modal-icon {
  color: #f59e0b;
}

.alert-modal.success .confirm-modal-header {
  background: #f0fdf4;
}

.alert-modal.success .confirm-modal-icon {
  color: #10b981;
}

.alert-modal.success .confirm-modal-btn.confirm {
  background: #10b981;
}

.alert-modal.success .confirm-modal-btn.confirm:hover {
  background: #059669;
}

.alert-modal.info .confirm-modal-header {
  background: #eff6ff;
}

.alert-modal.info .confirm-modal-icon {
  color: #3b82f6;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .confirm-modal {
    max-width: none;
    margin: 10px;
  }

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

  .confirm-modal-body {
    padding: 16px 20px;
  }

  .confirm-modal-footer {
    padding: 12px 20px 16px;
    flex-direction: column-reverse;
  }

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

/* RTL Support */
[dir="rtl"] .confirm-modal-footer {
  flex-direction: row-reverse;
}

@media (max-width: 480px) {
  [dir="rtl"] .confirm-modal-footer {
    flex-direction: column-reverse;
  }
}
