/* ============================================
   PHASE 0 COMPONENT STYLES
   Buttons, cards, forms, and UI elements
   ============================================ */

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
  font-family: var(--font-sans);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Button sizes */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1.125rem 2rem;
  font-size: 1.125rem;
}

/* Primary button */
.btn-primary {
  background-color: #3b82f6;
  color: white;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
  background-color: #1e40af;
  transform: translateY(0);
}

.btn-primary:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.btn-primary:disabled {
  background-color: #bfdbfe;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Secondary button */
.btn-secondary {
  background-color: white;
  color: #1a2639;
  border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #1a2639;
}

.btn-secondary:active {
  background-color: #f3f4f6;
}

.btn-secondary:focus {
  outline: 2px solid #1a2639;
  outline-offset: 2px;
}

.btn-secondary:disabled {
  background-color: #f9fafb;
  color: #d1d5db;
  border-color: #d1d5db;
  cursor: not-allowed;
}

/* Outline button */
.btn-outline {
  background-color: transparent;
  color: #3b82f6;
  border: 2px solid #3b82f6;
}

.btn-outline:hover {
  background-color: #dbeafe;
}

.btn-outline:active {
  background-color: #bfdbfe;
}

/* Dark button */
.btn-dark {
  background-color: #1a2639;
  color: white;
}

.btn-dark:hover {
  background-color: #0f1821;
}

.btn-dark:active {
  background-color: #051120;
}

/* Block button */
.btn-block {
  width: 100%;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: #d1d5db;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background-color: #dbeafe;
  color: #3b82f6;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card .card-icon.success {
  background-color: #d1fae5;
  color: #10b981;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a2639;
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

.card-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a2639;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-label .required {
  color: #ef4444;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: white;
  color: #1a2639;
  font-family: var(--font-sans);
  transition: all var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:disabled {
  background-color: #f9fafb;
  color: #d1d5db;
  cursor: not-allowed;
}

.form-control::placeholder {
  color: #9ca3af;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-sans);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: #3b82f6;
}

.form-check-label {
  cursor: pointer;
  font-size: 0.95rem;
  color: #4b5563;
}

.form-help-text {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.form-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-error {
  background-color: #fee2e2;
  color: #991b1b;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
  border-left-color: #3b82f6;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border-left-color: #10b981;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border-left-color: #f59e0b;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border-left-color: #ef4444;
}

/* ============================================
   LOADING & SPINNERS
   ============================================ */

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-sm {
  width: 0.75rem;
  height: 0.75rem;
  border-width: 1.5px;
}

.spinner-lg {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 2.5px;
}

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

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress {
  width: 100%;
  height: 6px;
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 100%;
  background-color: #3b82f6;
  transition: width var(--transition-base);
}

/* ============================================
   BADGE WITH INDICATOR
   ============================================ */

.badge-with-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  font-size: 0.85rem;
  color: #1e40af;
  font-weight: 500;
}

.badge-indicator {
  width: 0.5rem;
  height: 0.5rem;
  background-color: #3b82f6;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================
   DIVIDERS
   ============================================ */

.divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.5rem 0;
}

.divider-text {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
}

.divider-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid #e5e7eb;
  z-index: 0;
}

.divider-text span {
  background-color: white;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
  color: #9ca3af;
  font-size: 0.85rem;
}

/* ============================================
   SHADOWS - UTILITY
   ============================================ */

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-xl {
  box-shadow: var(--shadow-xl);
}
