/**
 * Plugin Loader Styles
 * Loading indicators, error toasts, security warnings
 */

/* Loading Indicator */
#plugin-loader-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.plugin-loading {
  text-align: center;
  color: #fff;
}

.plugin-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: plugin-spin 0.8s linear infinite;
}

@keyframes plugin-spin {
  to {
    transform: rotate(360deg);
  }
}

.plugin-loading-text {
  font-size: 14px;
  opacity: 0.8;
}

/* Error Toast */
.plugin-error-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 100, 100, 0.95);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: toast-in 0.3s ease-out;
}

.plugin-error-toast.fade-out {
  animation: toast-out 0.3s ease-out forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

/* Security Warning Modal */
.plugin-security-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
}

.security-warning-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.security-warning-content {
  position: relative;
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 24px 32px;
  max-width: 400px;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.security-warning-content h3 {
  margin: 0 0 16px;
  font-size: 18px;
  color: #ffa500;
}

.security-warning-content p {
  margin: 8px 0;
  font-size: 14px;
  opacity: 0.9;
}

.security-warning-content code {
  display: block;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 4px;
  margin: 12px 0;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
}

.security-warning-content .warning-text {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 16px;
}

.warning-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.warning-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.warning-btn:hover {
  opacity: 0.9;
}

.warning-btn.cancel {
  background: #444;
  color: #fff;
}

.warning-btn.proceed {
  background: #ffa500;
  color: #000;
}

/* Remember Checkbox */
.warning-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  user-select: none;
}

.warning-remember:hover {
  color: rgba(255, 255, 255, 0.9);
}

.remember-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #ffa500;
  cursor: pointer;
}
