/* ==========================================================================
   COMPONENTS: WHITE THEME — FINANCIAL CALCULATOR, 3D CARD VISUALIZER, 
   ISO 8583 TELEMETRY SIMULATOR & METRICS
   ========================================================================== */

/* ── Live Ticker Strip (Institutional Slate-Blue & Amber Tint) ── */
.financial-ticker-bar {
  background: linear-gradient(90deg, #edf4fc 0%, #ffffff 50%, #edf4fc 100%);
  border-top: 1px solid #d5e2f0;
  border-bottom: 2.5px solid var(--logo-amber, #e58e1a);
  padding: 12px 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 3px 10px rgba(11, 60, 117, 0.05);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 36px;
  animation: tickerSlide 35s linear infinite;
  white-space: nowrap;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #475569;
}

.ticker-item strong {
  color: var(--primary-navy);
}

.ticker-positive {
  color: #059669;
}

.ticker-bullet {
  color: var(--accent-gold);
  font-size: 0.6rem;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Interactive 3D Card Visualizer (White Theme) ── */
.card-visualizer-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 16px 40px rgba(11, 60, 117, 0.08);
}

.card-stage {
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
  background: radial-gradient(circle, rgba(11, 60, 117, 0.04) 0%, transparent 70%);
  border-radius: 16px;
}

.bank-card-3d {
  width: 380px;
  height: 235px;
  border-radius: 16px;
  position: relative;
  padding: 24px 28px;
  color: #ffffff;
  box-shadow: 0 20px 45px rgba(11, 60, 117, 0.25), 0 0 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.bank-card-3d:hover {
  transform: rotateY(8deg) rotateX(-5deg) translateY(-8px);
  box-shadow: 0 30px 60px rgba(11, 60, 117, 0.35);
}

/* Card Skin Variations */
.bank-card-3d.theme-black-metal {
  background: linear-gradient(135deg, #1f242e 0%, #0b0d13 50%, #171b22 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.bank-card-3d.theme-gold-vip {
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 50%, #f3e5ab 100%);
  color: #1a1607;
  border: 1px solid #ffd700;
}

.bank-card-3d.theme-navy-elite {
  background: linear-gradient(135deg, #0b3c75 0%, #031833 50%, #1e40af 100%);
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.bank-card-3d.theme-platinum {
  background: linear-gradient(135deg, #94a3b8 0%, #475569 50%, #cbd5e1 100%);
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Card Sheen & Texture Overlay */
.card-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
  pointer-events: none;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.card-bank-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-bank-brand img {
  height: 28px;
  width: auto;
}

.card-bank-brand span {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.card-chip-contactless {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0;
  position: relative;
  z-index: 2;
}

/* Realistic Gold EMV Chip */
.emv-chip {
  width: 46px;
  height: 35px;
  background: linear-gradient(135deg, #d4af37 0%, #fef08a 50%, #b45309 100%);
  border-radius: 6px;
  position: relative;
  border: 1px solid #78350f;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
}

.emv-chip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(120, 53, 15, 0.5);
}

.emv-chip::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(120, 53, 15, 0.5);
}

.contactless-waves i {
  font-size: 1.35rem;
  opacity: 0.85;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  letter-spacing: 3.5px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 2;
}

.card-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.card-holder-block {
  display: flex;
  flex-direction: column;
}

.card-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.75;
}

.card-holder-name {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.card-expiry {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-left: 20px;
}

.card-network-logo i {
  font-size: 2.2rem;
}

/* Card Controls */
.visualizer-controls h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-dark-1);
}

.visualizer-controls p {
  font-size: 0.92rem;
  color: var(--text-dark-4);
  margin-bottom: 24px;
}

.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.btn-theme-select {
  padding: 12px 16px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: var(--text-dark-2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-theme-select.active, .btn-theme-select:hover {
  background: #ffffff;
  border-color: var(--primary-navy);
  color: var(--primary-navy);
  box-shadow: 0 2px 8px rgba(11, 60, 117, 0.12);
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Interactive ISO 8583 Packet Telemetry Terminal (White Theme Container) ── */
.telemetry-simulator-terminal {
  background: #090e1a;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(11, 60, 117, 0.1);
  font-family: var(--font-mono);
}

.terminal-header {
  background: #0f172a;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-size: 0.78rem;
  color: #cbd5e1;
  letter-spacing: 0.5px;
}

.terminal-body {
  padding: 24px;
  font-size: 0.82rem;
  line-height: 1.7;
}

.telemetry-row {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.telemetry-label {
  color: #60a5fa;
  min-width: 140px;
}

.telemetry-val {
  color: #e2e8f0;
}

.telemetry-highlight {
  color: #fcd34d;
  font-weight: 700;
}

.telemetry-success {
  color: #34d399;
  font-weight: 700;
}

.telemetry-error {
  color: #f87171;
  font-weight: 700;
}

.terminal-controls {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Interactive Financial Instrument Calculator (White Theme) ── */
.calc-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.calc-inputs-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 4px 18px rgba(11, 60, 117, 0.05);
}

.calc-results-box {
  background: linear-gradient(135deg, #0b3c75 0%, #062349 100%);
  border: 1px solid #0b3c75;
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(11, 60, 117, 0.2);
}

.calc-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

.calc-result-row.total-row {
  border-bottom: none;
  padding-top: 20px;
}

.calc-result-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #fce79f;
  font-weight: 700;
}

.calc-result-val.large {
  font-size: 1.55rem;
  color: #ffffff;
}

@media (max-width: 900px) {
  .card-visualizer-container, .calc-wrapper {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .bank-card-3d {
    width: 100%;
    max-width: 360px;
  }
}
