/* public/css/styles.css */

/* Base Variables */
:root {
    /* Colors */
    --color-primary: #2563eb;      /* Blue for primary actions */
    --color-success: #16a34a;      /* Green for success states */
    --color-warning: #ca8a04;      /* Yellow for warnings */
    --color-error: #dc2626;        /* Red for errors */
    --color-background: #f8fafc;   /* Light gray for background */
    --color-surface: #ffffff;      /* White for cards/surfaces */
    --color-text: #1e293b;         /* Dark blue-gray for text */
    --color-text-secondary: #64748b; /* Lighter text for secondary info */
  
    /* Spacing */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
  
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
  }
  
  /* Reset and Base Styles */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.5;
  }
  
  /* Layout */
  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
  }
  
  /* Cards */
  .card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }
  
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
  }
  
  .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
  }
  
  /* Buttons */
  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
  }
  
  .button-primary {
    background-color: var(--color-primary);
    color: white;
  }
  
  .button-outline {
    background-color: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
  }
  
  .button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }
  
  .button:active {
    transform: translateY(0);
  }
  
  /* Progress and Metrics */
  .progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: var(--color-background);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }
  
  .progress-fill {
    height: 100%;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
  }
  
  .metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
  }
  
  .metric-card {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-sm);
  }
  
  .metric-title {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
  }
  
  .metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
  }
  
  /* File List */
  .file-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .file-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }
  
  .file-icon {
    margin-right: var(--spacing-md);
    color: var(--color-text-secondary);
  }
  
  .file-details {
    flex: 1;
  }
  
  .file-name {
    font-weight: 500;
  }
  
  .file-meta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
  }
  
  .file-actions {
    display: flex;
    gap: var(--spacing-sm);
  }
  
  /* Utility Classes */
  .hidden {
    display: none !important;
  }
  
  .text-center {
    text-align: center;
  }
  
  .mt-2 { margin-top: var(--spacing-md); }
  .mb-2 { margin-bottom: var(--spacing-md); }

/* Toast Messages */
.error-toast,
.success-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  color: white;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
  z-index: 1000;
}

.error-toast {
  background-color: var(--color-error);
}

.success-toast {
  background-color: var(--color-success);
}

/* Download Progress */
.download-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

/* In styles.css */
.status-ok {
    color: var(--color-success);
}

.status-error {
    color: var(--color-error);
}

.upload-area {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.encryption-toggle {
  padding: var(--spacing-sm);
  background-color: var(--color-background);
  border-radius: var(--radius-sm);
}

.upload-controls {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.progress-container {
  margin-top: var(--spacing-md);
}

.info-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 24px;
  background-color: #17a2b8;
  color: white;
  border-radius: 4px;
  z-index: 1000;
  animation: toast-in 0.3s ease-in-out;
}

@keyframes toast-in {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
