/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  min-width: 200px;
}

.loading-message {
  margin-top: 1rem;
  color: #333;
  font-weight: 500;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 20px 24px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  min-width: 320px;
  max-width: 500px;
  font-size: 16px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(500px);
  transition: all 0.3s ease-in-out;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  border-left: 5px solid #28a745;
  background: #d4edda;
  color: #155724;
}

.toast-error {
  border-left: 5px solid #dc3545;
  background: #f8d7da;
  color: #721c24;
}

.toast-info {
  border-left: 5px solid #17a2b8;
  background: #d1ecf1;
  color: #0c5460;
}

/* Improved modal max height */
.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Confirm Dialog */
.confirm-dialog-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.confirm-dialog {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  overflow: hidden;
  animation: scaleIn 0.3s ease-out;
}

.confirm-dialog-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e9ecef;
}

.confirm-dialog-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #212529;
}

.confirm-dialog-body {
  padding: 24px;
  font-size: 16px;
  color: #495057;
  line-height: 1.6;
}

.confirm-dialog-footer {
  padding: 16px 24px;
  background: #f8f9fa;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-dialog-footer button {
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-dialog-footer .btn-confirm {
  background: #dc3545;
  color: white;
}

.confirm-dialog-footer .btn-confirm:hover {
  background: #bb2d3b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.confirm-dialog-footer .btn-cancel {
  background: #6c757d;
  color: white;
}

.confirm-dialog-footer .btn-cancel:hover {
  background: #5c636a;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Search highlight */
.search-highlight {
  background-color: #fff3cd;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Keyboard shortcut hints */
.keyboard-hint {
  font-size: 0.75rem;
  color: #6c757d;
  margin-left: 0.5rem;
}

.kbd {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  font-family: monospace;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}
