/* public/css/usage-warnings.css */
/* Usage threshold warnings and quota display styles */

/* ==========================================
   WARNING BANNERS
   ========================================== */

.usage-warning-container {
  position: fixed;
  top: 60px; /* Below header */
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 16px;
  pointer-events: none;
}

.usage-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease-out;
  pointer-events: auto;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

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

/* Warning levels */
.usage-warning-warning {
  border-left: 4px solid #ff9800;
  background: #fff8e1;
}

.usage-warning-critical {
  border-left: 4px solid #f44336;
  background: #ffebee;
}

.usage-warning-blocked {
  border-left: 4px solid #d32f2f;
  background: #ffcdd2;
}

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

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

.warning-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: #212121;
}

.warning-message {
  font-size: 13px;
  color: #424242;
  line-height: 1.4;
}

.warning-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.warning-actions button {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-upgrade {
  background: #2196f3;
  color: white;
}

.btn-upgrade:hover {
  background: #1976d2;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.btn-dismiss {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
}

.btn-dismiss:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

/* ==========================================
   QUOTA CARDS (Dashboard)
   ========================================== */

.quota-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.quota-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.quota-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Status colors */
.quota-card.status-ok {
  border-color: #4caf50;
}

.quota-card.status-warning {
  border-color: #ff9800;
}

.quota-card.status-critical {
  border-color: #f44336;
}

.quota-card.status-blocked {
  border-color: #d32f2f;
  background: #ffebee;
}

.quota-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.quota-icon {
  font-size: 32px;
}

.quota-title {
  font-size: 18px;
  font-weight: 600;
  color: #212121;
}

.quota-progress {
  margin-bottom: 12px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  transition: width 0.5s ease, background-color 0.3s ease;
  border-radius: 6px;
}

.progress-fill.status-ok {
  background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.progress-fill.status-warning {
  background: linear-gradient(90deg, #ff9800, #ffa726);
}

.progress-fill.status-critical {
  background: linear-gradient(90deg, #f44336, #e57373);
}

.progress-fill.status-blocked {
  background: linear-gradient(90deg, #d32f2f, #f44336);
}

.progress-text {
  font-size: 14px;
  font-weight: 600;
  color: #424242;
  text-align: right;
}

.quota-details {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  color: #424242;
}

.quota-used {
  font-weight: 700;
  font-size: 24px;
  color: #212121;
}

.quota-separator {
  color: #9e9e9e;
  font-weight: 400;
}

.quota-limit {
  color: #616161;
}

/* ==========================================
   MODEL SELECTOR ENHANCEMENTS
   ========================================== */

/* Add visual indicators to model selector options */
#aiModelSelector optgroup {
  font-weight: 600;
  color: #424242;
  padding: 8px 0;
}

#aiModelSelector option {
  padding: 8px 12px;
  font-size: 14px;
}

/* Efficiency icons in dropdown */
#aiModelSelector option::before {
  margin-right: 8px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
  .usage-warning-container {
    top: 50px;
    padding: 6px 12px;
  }

  .usage-warning {
    flex-wrap: wrap;
    padding: 12px;
  }

  .warning-actions {
    width: 100%;
    margin-top: 8px;
  }

  .warning-actions button {
    flex: 1;
  }

  .quota-cards-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .quota-card {
    padding: 16px;
  }

  .quota-icon {
    font-size: 28px;
  }

  .quota-title {
    font-size: 16px;
  }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
  .usage-warning {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .usage-warning-warning {
    background: #332a00;
  }

  .usage-warning-critical {
    background: #331111;
  }

  .usage-warning-blocked {
    background: #3d1a1a;
  }

  .warning-title,
  .warning-message {
    color: #e0e0e0;
  }

  .quota-card {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .quota-title,
  .quota-used {
    color: #e0e0e0;
  }

  .quota-details {
    color: #bdbdbd;
  }

  .progress-bar {
    background: #333;
  }

  .btn-dismiss {
    color: #bdbdbd;
    border-color: #444;
  }

  .btn-dismiss:hover {
    background: #2a2a2a;
    border-color: #666;
  }
}
