/**
 * COMPONENT STYLES
 * Styling for reusable UI components
 */

/* ─────────────────────────────────────
   BUTTONS & INTERACTIVE ELEMENTS
   ───────────────────────────────────── */

.btn-arcade {
  transition: all 0.15s ease;
  box-shadow: 0 6px 0 0 rgba(0, 0, 0, 0.15);
}

.btn-arcade:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 0 rgba(0, 0, 0, 0.15);
}

.btn-arcade:active {
  transform: translateY(6px);
  box-shadow: 0 0px 0 0 rgba(0, 0, 0, 0.15);
}

.btn-arcade-blue {
  box-shadow: 0 6px 0 0 #3730a3;
}

.btn-arcade-blue:active {
  transform: translateY(6px);
  box-shadow: 0 0px 0 0 #3730a3;
}

.btn-arcade-green {
  box-shadow: 0 6px 0 0 #065f46;
}

.btn-arcade-green:active {
  transform: translateY(6px);
  box-shadow: 0 0px 0 0 #065f46;
}

.btn-arcade-dark {
  box-shadow: 0 6px 0 0 #0f172a;
}

.btn-arcade-dark:active {
  transform: translateY(6px);
  box-shadow: 0 0px 0 0 #0f172a;
}

/* ─────────────────────────────────────
   GLASS MORPHISM
   ───────────────────────────────────── */

.glass-dock {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ─────────────────────────────────────
   CARDS & CONTAINERS
   ───────────────────────────────────── */

.card-base {
  background: white;
  border-radius: 1.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.card-base:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-elevated {
  background: white;
  border-radius: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ─────────────────────────────────────
   STAT CARDS
   ───────────────────────────────────── */

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 2rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 20s linear infinite;
}

.stat-card-content {
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────
   BADGES & TAGS
   ───────────────────────────────────── */

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

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

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

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

.badge-info {
  background: #dbeafe;
  color: #0c2340;
}

/* ─────────────────────────────────────
   FORM ELEMENTS
   ───────────────────────────────────── */

.input-base {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.input-base:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-base:invalid {
  border-color: #dc2626;
}

.select-base {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234f46e5' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-color: white;
  padding-right: 2.5rem;
}

/* ─────────────────────────────────────
   TABLES
   ───────────────────────────────────── */

.table-base {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table-base thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.table-base th {
  padding: 1rem;
  text-align: left;
  font-weight: 900;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

.table-base td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.table-base tbody tr:hover {
  background: #f8fafc;
}

/* ─────────────────────────────────────
   MODALS & OVERLAYS
   ───────────────────────────────────── */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 2rem;
  padding: 2rem;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: scale-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

/* ─────────────────────────────────────
   BOTTOM SHEET
   ───────────────────────────────────── */

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 2rem 2rem 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  z-index: 40;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.1);
}

.bottom-sheet.open {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 999px;
  margin: 1rem auto 1.5rem;
}

/* ─────────────────────────────────────
   SCROLLBAR STYLING
   ───────────────────────────────────── */

.table-scroll::-webkit-scrollbar {
  display: block;
  height: 6px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ─────────────────────────────────────
   ICON STYLING
   ───────────────────────────────────── */

[data-lucide] {
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-md {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-lg {
  width: 2rem;
  height: 2rem;
}

.icon-xl {
  width: 3rem;
  height: 3rem;
}

/* ─────────────────────────────────────
   LOADING SPINNER
   ───────────────────────────────────── */

.spinner {
  width: 2rem;
  height: 2rem;
  border: 4px solid #e2e8f0;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ─────────────────────────────────────
   TOOLTIP
   ───────────────────────────────────── */

.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: #1e293b;
  color: white;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.tooltip:hover::after {
  opacity: 1;
}
