/* ==========================================================
   Financial & IPO Tracking Portal - Custom Stylesheet
   Enhanced aesthetics for InvestorGain-inspired tabular UI
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-navy: #0f172a;
  --accent-emerald: #10b981;
  --accent-blue: #2563eb;
  --border-light: #e2e8f0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar for dense financial tables */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Infinite Marquee Animation for Header Ticker */
@keyframes ticker-slide {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

.ticker-content {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-slide 35s linear infinite;
}

.ticker-content:hover {
  animation-play-state: paused;
}

/* ==========================================================
   Financial & Business Data Tables (Clean, Spacious, Readable)
   ========================================================== */
.business-table,
.financial-table {
  width: 100% !important;
  border-collapse: collapse !important;
  text-align: left;
  font-size: 0.875rem !important; /* 14px readable font */
  line-height: 1.6 !important;
  color: #1e293b;
  min-width: 600px;
}

.business-table thead,
.financial-table thead {
  background-color: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.business-table th,
.financial-table th {
  padding: 13px 20px !important;
  font-size: 0.75rem !important; /* 12px */
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #475569 !important;
  white-space: nowrap !important;
  vertical-align: middle;
}

.business-table td,
.financial-table td {
  padding: 14px 20px !important;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-size: 0.875rem !important; /* 14px */
  color: #1e293b;
}

.business-table tbody tr,
.financial-table tbody tr {
  transition: background-color 0.15s ease-in-out;
}

.business-table tbody tr:hover,
.financial-table tbody tr:hover {
  background-color: #f8fafc !important;
}

.business-table th.text-right,
.business-table td.text-right,
.financial-table th.text-right,
.financial-table td.text-right {
  text-align: right !important;
}

.business-table th.text-center,
.business-table td.text-center,
.financial-table th.text-center,
.financial-table td.text-center {
  text-align: center !important;
}

.business-table .sub-row td,
.financial-table .sub-row td {
  padding: 10px 20px !important;
  font-size: 0.8125rem !important; /* 13px */
  color: #64748b;
  background-color: #fcfdfe;
}

.business-table .total-row,
.financial-table .total-row {
  background-color: #f1f5f9 !important;
  font-weight: 700 !important;
  border-top: 2px solid #cbd5e1 !important;
  color: #0f172a !important;
}

.business-table .total-row td,
.financial-table .total-row td {
  padding: 14px 20px !important;
}

/* Sticky column on mobile for company names */
@media (max-width: 640px) {
  .sticky-col {
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 5;
    box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.08);
  }
}

/* Subtle glow effects for high-performing IPOs */
.badge-glow-green {
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.badge-glow-blue {
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.25);
}

/* Timeline Stepper Component */
.timeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 3px;
  background-color: #e2e8f0;
  z-index: 1;
}

.timeline-step.completed:not(:last-child)::after {
  background-color: #10b981;
}

.timeline-step.active:not(:last-child)::after {
  background: linear-gradient(90deg, #10b981 50%, #e2e8f0 50%);
}

.timeline-node {
  position: relative;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

/* Responsive Mobile Table Scroll Container */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

/* Hide scrollbar utility for touch swipe tabs */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile responsive font sizing & tap target optimization */
@media (max-width: 640px) {
  .ticker-wrap {
    font-size: 11px;
  }
  
  /* Prevent iOS zoom on input focus */
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="email"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Responsive financial card padding */
  .financial-card {
    padding: 1rem !important;
  }
}

/* Print optimizations for IPO analysis sheet */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}

/* ==========================================================
   Retro Neo-Brutalist Pop IPO Card System (Reference Style)
   ========================================================== */
.retro-ipo-card {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #FED843;
  border: 3.5px solid #000000;
  box-shadow: 7px 7px 0px #000000;
  border-radius: 0px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: visible;
  box-sizing: border-box;
  width: 100%;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.retro-ipo-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0px #000000;
}

.retro-card-header {
  background-color: #FED843;
  padding: 16px 14px 12px 14px;
  position: relative;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.retro-badge-wrapper {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.retro-company-title {
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1.15;
  color: #000000;
  letter-spacing: -0.01em;
  padding-right: 88px;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.retro-company-title:hover {
  color: #000000;
  text-decoration: underline;
}

.retro-sector-subtitle {
  font-size: 0.78rem;
  font-weight: 800;
  color: #222222;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 4px;
  padding-right: 88px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status Badges: Tilted Sticker Style with Thick Border & Shadow */
.retro-status-badge {
  display: inline-block;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: 9px;
  border: 3px solid #000000;
  box-shadow: 3px 3px 0px #000000;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
  transform: rotate(-8deg);
  transition: transform 0.15s ease;
}

.retro-status-badge:hover {
  transform: rotate(0deg) scale(1.05);
}

.retro-badge-open {
  background-color: #80EFB5; /* Mint green */
  color: #000000;
}

.retro-badge-upcoming {
  background-color: #7DD3FC; /* Sky blue */
  color: #000000;
}

.retro-badge-closed {
  background-color: #CBD5E1; /* Cool gray */
  color: #000000;
}

.retro-badge-listed {
  background-color: #D8B4FE; /* Lilac purple */
  color: #000000;
}

/* GMP Label Bar (Bubblegum Pink) */
.retro-gmp-bar {
  background-color: #FFA1CB;
  border-top: 3px solid #000000;
  border-bottom: 3px solid #000000;
  padding: 5px 14px;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #000000;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Main GMP Value Box (Seafoam / Mint Green) */
.retro-gmp-value-box {
  background-color: #72ECC3;
  border-bottom: 3px solid #000000;
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.retro-gmp-price {
  font-size: 2.8rem;
  font-weight: 900;
  color: #000000;
  line-height: 1;
  letter-spacing: -0.02em;
}

.retro-gmp-percent {
  font-size: 1.45rem;
  font-weight: 900;
  color: #000000;
  margin-top: 4px;
  line-height: 1.2;
}

/* Key Stats Data Rows (Sunny Yellow) */
.retro-data-table {
  background-color: #FED843;
  display: flex;
  flex-direction: column;
}

.retro-data-row {
  border-bottom: 2.5px solid #000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 14px;
}

.retro-data-label {
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #000000;
  text-transform: uppercase;
}

.retro-data-val {
  font-size: 1.02rem;
  font-weight: 900;
  color: #000000;
  text-align: right;
  letter-spacing: -0.01em;
}

.retro-stars {
  font-family: system-ui, sans-serif;
  letter-spacing: 1px;
  font-weight: 900;
}

/* Bottom Action Button Section (White Container + Pink Button) */
.retro-btn-container {
  background-color: #FFFFFF;
  padding: 12px 14px;
  border-top: 3px solid #000000;
}

.retro-btn-details {
  background-color: #FFA1CB;
  border: 3px solid #000000;
  border-radius: 8px;
  box-shadow: 3.5px 3.5px 0px #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 18px;
  color: #000000 !important;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: all 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.retro-btn-details:hover {
  background-color: #ff8ec9;
  transform: translate(-1.5px, -1.5px);
  box-shadow: 5px 5px 0px #000000;
}

.retro-btn-details:active {
  transform: translate(2px, 2px);
  box-shadow: 1.5px 1.5px 0px #000000;
}

.retro-cursor-icon {
  width: 22px;
  height: 22px;
  fill: #000000;
  display: inline-block;
  flex-shrink: 0;
}

