/**
 * QuickSedis Design System - Component Styles
 * Centralized component styles to eliminate duplication
 */

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
  --color-primary: #005461;
  --color-primary-light: #0C7779;
  --color-secondary: #3BC1A8;
  --color-accent: #249E94;
  --color-neutral-dark: #1E293B;
  --color-neutral-light: #F8FAFC;
  --color-border: #E2E8F0;
  --border-radius-card: 0.75rem;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
  --transition-default: 200ms ease-out;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all var(--transition-default);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  box-shadow: 0 4px 12px rgba(0, 84, 97, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-primary);
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 2px solid var(--color-primary);
  transition: all var(--transition-default);
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: white;
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-primary);
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  transition: all var(--transition-default);
  cursor: pointer;
  text-decoration: none;
}

.btn-ghost:hover {
  background-color: rgba(0, 84, 97, 0.1);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

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

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background-color: white;
  border-radius: var(--border-radius-card);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-default);
}

.card-elevated {
  background-color: white;
  border-radius: var(--border-radius-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-default);
}

.card-interactive {
  background-color: white;
  border-radius: var(--border-radius-card);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-default);
  cursor: pointer;
}

.card-interactive:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

/* ==========================================================================
   Badges - Status
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-pending {
  background-color: #FEF3C7;
  color: #92400E;
}

.badge-paid {
  background-color: #DBEAFE;
  color: #1E40AF;
}

.badge-received {
  background-color: #E9D5FF;
  color: #6B21A8;
}

.badge-sent {
  background-color: #D1FAE5;
  color: #065F46;
}

.badge-completed {
  background-color: #D1FAE5;
  color: #065F46;
}

.badge-failed {
  background-color: #FEE2E2;
  color: #991B1B;
}

.badge-cancelled {
  background-color: #F3F4F6;
  color: #4B5563;
}

/* ==========================================================================
   Badges - Type
   ========================================================================== */
.badge-buy {
  background-color: #DBEAFE;
  color: #1E40AF;
}

.badge-sell {
  background-color: #D1FAE5;
  color: #065F46;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all var(--transition-default);
  outline: none;
  background-color: white;
}

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 84, 97, 0.1);
}

.input-error {
  border-color: #EF4444;
}

.input-error:focus {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-success {
  border-color: #10B981;
}

.input-success:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all var(--transition-default);
  outline: none;
  background-color: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 84, 97, 0.1);
}

/* ==========================================================================
   Typography
   ========================================================================== */
.heading-1 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.heading-2 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.heading-3 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.body-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-neutral-dark);
}

.caption {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(30, 41, 59, 0.7);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.5s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

/* ==========================================================================
   Info Alert Styles
   ========================================================================== */
.info-alert {
  border-radius: var(--border-radius-card);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.info-alert-blue {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1px solid #BFDBFE;
}

.info-alert-green {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1px solid #A7F3D0;
}

.info-alert-amber {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1px solid #FDE68A;
}

.info-alert-red {
  background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
  border: 1px solid #FECACA;
}

.info-alert-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-alert-icon-blue {
  background-color: #3B82F6;
  color: white;
}

.info-alert-icon-green {
  background-color: #10B981;
  color: white;
}

.info-alert-icon-amber {
  background-color: #F59E0B;
  color: white;
}

.info-alert-icon-red {
  background-color: #EF4444;
  color: white;
}

/* ==========================================================================
   Dashboard Sidebar Styles
   ========================================================================== */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 0.75rem;
  transition: all var(--transition-default);
  text-decoration: none;
}

.sidebar-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-nav-item.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border-left: 3px solid var(--color-secondary);
}

.sidebar-nav-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav-item.active .sidebar-nav-icon {
  background-color: var(--color-secondary);
}

/* ==========================================================================
   Crypto Selection Card
   ========================================================================== */
.crypto-select-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius-card);
  cursor: pointer;
  transition: all var(--transition-default);
}

.crypto-select-card:hover:not(.disabled) {
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 84, 97, 0.15);
}

.crypto-select-card.selected {
  border-color: var(--color-primary);
  background-color: #E0F7FA;
}

.crypto-select-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.crypto-check-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background-color: var(--color-primary);
  border: 2px solid white;
  border-radius: 9999px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.crypto-select-card.selected .crypto-check-indicator {
  display: flex;
}

/* ==========================================================================
   Quick Action Cards (Dashboard)
   ========================================================================== */
.quick-action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background-color: white;
  border-radius: var(--border-radius-card);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-default);
  text-decoration: none;
}

.quick-action-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.quick-action-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.quick-action-card:hover .quick-action-icon {
  transform: scale(1.1);
}

.quick-action-icon-primary {
  background-color: rgba(0, 84, 97, 0.1);
  color: var(--color-primary);
}

.quick-action-icon-secondary {
  background-color: rgba(59, 193, 168, 0.1);
  color: var(--color-secondary);
}

/* ==========================================================================
   Welcome Card (Dashboard)
   ========================================================================== */
.welcome-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  border-radius: var(--border-radius-card);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* ==========================================================================
   Transaction Table Enhancements
   ========================================================================== */
.transaction-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.transaction-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-neutral-dark);
  border-bottom: 1px solid var(--color-border);
}

.transaction-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--color-border);
}

.transaction-table tr {
  transition: all var(--transition-default);
}

.transaction-table tbody tr:hover {
  background-color: rgba(248, 250, 252, 0.8);
  transform: translateX(4px);
}
