/* Modal Component */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-overlay:not(.hidden) {
  opacity: 1;
}

.modal {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 32rem;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  position: relative;
  z-index: 1;
}

.modal-overlay:not(.hidden) .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
}

.modal-content {
  padding: var(--spacing-lg);
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

/* API Key Modal Styles */
.api-key-modal {
  text-align: center;
}

.api-key-modal p:first-child {
  color: var(--warning-color, #d97706);
  font-weight: 500;
  margin-bottom: var(--spacing-md);
}

.api-key-display-modal {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-md) 0;
  padding: var(--spacing-md);
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.api-key-display-modal .form-input {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-sm);
  letter-spacing: 0.5px;
}

.api-key-display-modal .btn {
  flex-shrink: 0;
}

.modal-warning {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-md) !important;
  font-style: italic;
}
