/**
 * RedMail Pro - Component Styles
 * Specific component styles
 */

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 768px) {
  #toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
}

.toast {
  min-width: 300px;
  padding: 16px 20px;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@media (max-width: 768px) {
  .toast {
    min-width: unset;
    width: 100%;
  }
}

.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-error {
  border-left: 4px solid var(--color-error);
}

.toast-warning {
  border-left: 4px solid var(--color-warning);
}

.toast-info {
  border-left: 4px solid var(--color-accent-primary);
}

.toast-message {
  flex: 1;
  color: var(--color-text-primary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0;
  font-size: 18px;
}

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

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

.toast.removing {
  animation: slideOut 0.3s ease;
}

/* ===================================
   LOADING SPINNER
   =================================== */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

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

/* ===================================
   CODE BLOCK
   =================================== */
.code-block {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: var(--spacing-md);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-x: auto;
}

/* ===================================
   FILE UPLOAD
   =================================== */
.file-upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: var(--spacing-xl);
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
  cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--color-accent-primary);
  background: rgba(229, 62, 62, 0.05);
}

.file-upload-icon {
  font-size: 48px;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
}

/* ===================================
   TABS
   =================================== */
.tabs {
  display: flex;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
  padding: var(--spacing-sm) var(--spacing-md);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
}

.tab:hover {
  color: var(--color-text-primary);
}

.tab.active {
  color: var(--color-accent-primary);
  border-bottom-color: var(--color-accent-primary);
}

/* ===================================
   EMPTY STATE
   =================================== */
.empty-state {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--color-text-secondary);
}

.empty-state svg {
  opacity: 0.3;
  margin-bottom: var(--spacing-md);
}

.empty-state h3 {
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

/* ===================================
   PAGINATION
   =================================== */
.pagination {
  display: flex;
  gap: var(--spacing-xs);
  justify-content: center;
  margin-top: var(--spacing-lg);
}

.pagination-btn {
  padding: 8px 12px;
  min-width: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.pagination-btn.active {
  background: rgba(229, 62, 62, 0.2);
  border-color: var(--color-accent-primary);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
