/* ==========================================================================
   CITADEL POS — AI-POWERED CLOUD POS STYLESHEET (css/pos.css)
   Seamless integration with Citadel Triad styles.css & Dark/Light Tokens
   ========================================================================== */

/* Hero Canvas & Atmosphere */
.pos-hero-canvas {
  position: relative;
  background: radial-gradient(circle at 82% 28%, rgba(37, 99, 235, 0.22), transparent 62%),
              radial-gradient(circle at 18% 75%, rgba(6, 182, 212, 0.12), transparent 58%),
              var(--canvas-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.pos-gradient-text {
  background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 48%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

html[data-theme="light"] .pos-hero-canvas {
  background: radial-gradient(circle at 82% 28%, rgba(37, 99, 235, 0.1), transparent 62%),
              radial-gradient(circle at 18% 75%, rgba(6, 182, 212, 0.08), transparent 58%),
              #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

/* ==========================================================================
   HERO ECOSYSTEM SHOWCASE MOCKUP (RIGHT COLUMN)
   ========================================================================== */
.pos-ecosystem-stage {
  position: relative;
  width: 100%;
  padding: 24px 16px;
  border-radius: 20px;
  background: rgba(11, 17, 30, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .pos-ecosystem-stage {
  background: rgba(248, 250, 252, 0.85);
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

/* Central Terminal Frame */
.pos-terminal-mockup {
  position: relative;
  z-index: 10;
  border-radius: 16px;
  background: #0B111E;
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(37, 99, 235, 0.15);
  overflow: hidden;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.pos-terminal-mockup:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7), 0 0 32px rgba(37, 99, 235, 0.25);
}

html[data-theme="light"] .pos-terminal-mockup {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

/* Terminal Header Bar */
.pos-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #070B14;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

html[data-theme="light"] .pos-terminal-header {
  background: #F1F5F9;
  border-bottom-color: #E2E8F0;
}

/* Terminal KPI & Live Cart */
.pos-terminal-body {
  padding: 14px;
}

.pos-bill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.3);
  margin-bottom: 6px;
  font-size: 11.5px;
  transition: background-color 150ms ease;
}

.pos-bill-item:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

html[data-theme="light"] .pos-bill-item {
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #0F172A;
}

/* Floating Badges */
.pos-floating-badge {
  position: absolute;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(11, 17, 30, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: floatSlow 4s ease-in-out infinite alternate;
}

.pos-floating-badge.badge-top-right {
  top: -12px;
  right: -8px;
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.4);
}

.pos-floating-badge.badge-bottom-left {
  bottom: -12px;
  left: -8px;
  color: #38BDF8;
  border-color: rgba(56, 189, 248, 0.4);
  animation-delay: -2s;
}

html[data-theme="light"] .pos-floating-badge {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

@keyframes floatSlow {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* Satellite Branch Mini-Cards */
.pos-satellite-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.pos-satellite-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: all 200ms ease;
  cursor: default;
}

.pos-satellite-card:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: var(--accent-blue-bright);
  transform: translateY(-2px);
}

html[data-theme="light"] .pos-satellite-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.pos-satellite-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

/* ==========================================================================
   INDUSTRY MODULES TABS (#pos-modules)
   ========================================================================== */
.pos-tab-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border-radius: 9999px;
  background: #0B111E;
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
  .pos-tab-nav {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    border-radius: 14px;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pos-tab-nav::-webkit-scrollbar {
    display: none;
  }
  .pos-tab-btn {
    flex-shrink: 0;
  }
}

html[data-theme="light"] .pos-tab-nav {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.pos-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
}

.pos-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .pos-tab-btn:hover {
  background: #FFFFFF;
}

.pos-tab-btn.active {
  color: #FFFFFF;
  background: #2563EB;
  border-color: #3B82F6;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.4);
  font-weight: 600;
}

.pos-module-stage {
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: opacity 250ms ease, transform 250ms ease;
}

html[data-theme="light"] .pos-module-stage {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

/* ==========================================================================
   AI & CLOUD CAPABILITIES GRID (#pos-features)
   ========================================================================== */
.pos-feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 18px;
  background: #0B111E;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pos-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2563EB, transparent);
  opacity: 0;
  transition: opacity 250ms ease;
}

.pos-feature-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3), 0 0 20px rgba(37, 99, 235, 0.1);
}

.pos-feature-card:hover::before {
  opacity: 1;
}

html[data-theme="light"] .pos-feature-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .pos-feature-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.pos-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #60A5FA;
  margin-bottom: 18px;
}

/* ==========================================================================
   HARDWARE ECOSYSTEM SHOWCASE (#pos-hardware)
   ========================================================================== */
.pos-hardware-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 18px;
  background: #0B111E;
  border: 1px solid var(--border-subtle);
  transition: all 250ms ease;
}

.pos-hardware-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .pos-hardware-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.pos-hardware-graphic {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 18px;
  overflow: hidden;
  transition: transform 250ms ease;
}

.pos-hardware-card:hover .pos-hardware-graphic {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.25);
}

html[data-theme="light"] .pos-hardware-graphic {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

/* ==========================================================================
   QUOTE CONFIGURATOR (#pos-quote)
   ========================================================================== */
.pos-config-card {
  border-radius: 20px;
  background: #0F172A;
  border: 1px solid var(--border-subtle);
  padding: 24px;
}

html[data-theme="light"] .pos-config-card {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.pos-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #1E293B;
  outline: none;
  transition: background 200ms;
}

html[data-theme="light"] .pos-range-slider {
  background: #CBD5E1;
}

.pos-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563EB;
  border: 2px solid #FFFFFF;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
  transition: transform 150ms ease;
}

.pos-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.pos-bundle-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0B111E;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
  transition: all 200ms ease;
}

.pos-bundle-btn.active {
  border-color: #2563EB;
  background: rgba(37, 99, 235, 0.1);
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.2);
}

html[data-theme="light"] .pos-bundle-btn {
  background: #FFFFFF;
  border-color: #E2E8F0;
}

html[data-theme="light"] .pos-bundle-btn.active {
  border-color: #2563EB;
  background: rgba(37, 99, 235, 0.08);
}

html[data-theme="light"] #posWhatsappPreviewBox {
  background: #FFFFFF;
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

html[data-theme="light"] #posWhatsappBriefPreview {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #0F172A;
}

/* ==========================================================================
   INTERACTIVE DEMO MODAL (#demoModal)
   ========================================================================== */
.pos-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
}

.pos-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.pos-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  background: #0B111E;
  border: 1px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  transform: translateY(12px) scale(0.98);
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pos-modal-overlay.is-active .pos-modal-dialog {
  transform: translateY(0) scale(1);
}

html[data-theme="light"] .pos-modal-dialog {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.pos-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: all 180ms ease;
}

.pos-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

/* Simulated Checkout Item Pill */
.pos-sim-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0F172A;
  border: 1px solid rgba(51, 65, 85, 0.6);
  cursor: pointer;
  transition: all 150ms ease;
  font-size: 12px;
}

.pos-sim-item-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: #3B82F6;
  transform: scale(1.02);
}

html[data-theme="light"] .pos-sim-item-btn {
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #0F172A;
}

/* ==========================================================================
   PRINT / RECEIPT PREVIEW
   ========================================================================== */
.pos-receipt-paper {
  font-family: 'JetBrains Mono', monospace;
  background: #FFFFFF;
  color: #0F172A;
  padding: 16px 14px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  border-top: 4px dashed #CBD5E1;
  border-bottom: 4px dashed #CBD5E1;
}

/* Responsive Breakpoints */
@media (max-width: 767px) {
  .pos-satellite-grid {
    grid-template-columns: 1fr;
  }
  .pos-floating-badge {
    position: static;
    margin-top: 8px;
    display: flex;
  }
}
