/**
 * PM-GatiShakti Portal Spotlight & Liquid Glassmorphism Guide Engine
 * Namespaced with .ps-* to avoid style collisions with OpenLayers, Bootstrap, etc.
 */

:root {
  --ps-primary: #ff9933;
  --ps-primary-glow: rgba(255, 153, 51, 0.45);
  --ps-accent: #138808;
  --ps-blue: #0056b3;
  --ps-glass-bg: rgba(255, 255, 255, 0.88);
  --ps-glass-border: rgba(255, 255, 255, 0.6);
  --ps-glass-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   SVG Spotlight Mask & Target Highlight
   ========================================================================== */

#ps-spotlight-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99990;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ps-hidden,
.ps-spotlight-ring.ps-hidden,
#ps-spotlight-ring.ps-hidden,
#ps-spotlight-overlay.ps-hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

.ps-spotlight-ring {
  position: fixed;
  border-radius: 10px;
  pointer-events: none;
  z-index: 99992;
  box-shadow: 0 0 0 3px #ff9933, 0 0 25px 6px rgba(255, 153, 51, 0.55);
  animation: psPulseRing 2s infinite ease-in-out;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes psPulseRing {
  0%, 100% {
    box-shadow: 0 0 0 3px #ff9933, 0 0 20px 4px rgba(255, 153, 51, 0.45);
  }
  50% {
    box-shadow: 0 0 0 5px #ffb366, 0 0 32px 10px rgba(255, 153, 51, 0.7);
  }
}

/* ==========================================================================
   Liquid Glass Floating Card / Step Tooltip
   ========================================================================== */

#ps-tooltip-card {
  position: fixed;
  z-index: 99995;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--ps-glass-bg);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--ps-glass-border);
  border-radius: 18px;
  box-shadow: var(--ps-glass-shadow);
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

#ps-tooltip-card.ps-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ps-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ps-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 153, 51, 0.15) 0%, rgba(255, 180, 80, 0.25) 100%);
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 153, 51, 0.35);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ps-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.ps-close-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}

.ps-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.ps-card-desc {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.55;
  margin: 0 0 16px 0;
}

.ps-card-media {
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden;
  max-height: 160px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.ps-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ps-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.ps-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ps-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.25s ease;
}

.ps-dot.active {
  background: #ff9933;
  width: 18px;
  border-radius: 4px;
}

.ps-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-btn {
  border: none;
  border-radius: 9px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ps-btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #475569;
}

.ps-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

.ps-btn-primary {
  background: linear-gradient(135deg, #ff9933 0%, #f57c00 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 153, 51, 0.35);
}

.ps-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 153, 51, 0.5);
}

/* ==========================================================================
   Liquid Glassmorphism Floating Page Widget (Ambient Orb)
   Positioned at the Top (Below Center of User-Interface)
   ========================================================================== */

#ps-floating-widget {
    position: fixed;
    top: auto !important;
    right: 20px !important;
    bottom: 20px !important;
    left: auto !important;
    z-index: 1020;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    pointer-events: auto;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1), top 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.ps-liquid-orb {
  display: flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 247, 237, 0.56) 100%) !important;
  backdrop-filter: blur(24px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 8px 25px rgba(255, 153, 51, 0.22), 0 2px 8px rgba(15, 23, 42, 0.08), inset 0 1.5px 2px #ffffff, inset 0 -1px 2px rgba(234, 88, 12, 0.15) !important;
  border-radius: 999px;
  padding: 6px 16px 6px 8px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.ps-liquid-orb:hover {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 240, 225, 0.78) 100%) !important;
  border-color: #ea580c !important;
  box-shadow: 0 12px 35px rgba(255, 153, 51, 0.38), 0 4px 12px rgba(15, 23, 42, 0.12), inset 0 1.5px 2px #ffffff !important;
}

.ps-orb-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9933 0%, #ea580c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  box-shadow: 0 3px 10px rgba(255, 153, 51, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
}

.ps-orb-icon::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255, 153, 51, 0.55);
  animation: psOrbBreath 2s infinite ease-in-out;
}

@keyframes psOrbBreath {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 0; }
}

.ps-orb-text {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.ps-orb-badge {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 2px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   Liquid Glass Floating Expanded Panel (Opens Directly Below with Hover Bridge)
   ========================================================================== */

.ps-liquid-panel {
  position: absolute;
  bottom: calc(100% + 8px);
  top: auto;
  right: 0;
  left: auto;
  transform-origin: bottom right;
  transform: translateY(-8px) scale(0.96);
  width: 360px;
  max-width: calc(100vw - 32px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 248, 240, 0.55) 100%) !important;
  backdrop-filter: blur(28px) saturate(210%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(210%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 153, 51, 0.20), inset 0 1.5px 2px rgba(255, 255, 255, 0.95), inset 0 -1px 2px rgba(234, 88, 12, 0.12) !important;
  border-radius: 20px;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s;
  z-index: 9005;
}

.ps-liquid-panel.ps-align-left {
  left: 0 !important;
  right: auto !important;
  transform-origin: top left !important;
}

/* Invisible Bridge: spans the gap so the mouse never loses hover */
.ps-liquid-panel::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 24px;
  background: transparent;
  cursor: pointer;
}

#ps-floating-widget.ps-expanded .ps-liquid-panel,
#ps-floating-widget:hover .ps-liquid-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto;
}

.ps-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.ps-panel-header span{
  color: #000!important;
}


.ps-panel-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 7px;
}

.ps-tour-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(248, 250, 252, 0.45) 100%) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05), inset 0 1px 1px #ffffff !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.ps-tour-item:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.90) 0%, rgba(255, 245, 235, 0.75) 100%) !important;
  border-color: rgba(255, 153, 51, 0.55) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 153, 51, 0.20), inset 0 1px 1px #ffffff !important;
}

.ps-tour-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.ps-tour-item-desc {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 10px;
}

.ps-tour-item-btn {
  background: linear-gradient(135deg, #ff9933 0%, #ea580c 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
}

.ps-tour-item-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ps-tour-doc-link,
.ps-step-doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7 !important;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ps-tour-doc-link:hover,
.ps-step-doc-btn:hover {
  background: #0284c7;
  color: #ffffff !important;
  border-color: #0284c7;
}

.ps-step-doc-btn i,
.ps-tour-doc-link i {
  font-size: 13px;
}
