/**
 * Kamu Atama TR — Pusula Spotlight Rehberi Stilleri
 * Hedef elemanı aydınlatıp çevresini yumuşakça odaklayan 4 parçalı overlay sistemi.
 */

:root {
  --ka-spotlight-bg: rgba(10, 25, 60, 0.28);
  --ka-spotlight-glow: rgba(52, 121, 228, 0.8);
  --ka-spotlight-shadow: rgba(52, 121, 228, 0.28);
  --ka-spotlight-card-bg: #ffffff;
}

/* 4 Parçalı Spotlight Overlay (Tıklamaları engellemez, sayfa akışını bozmaz) */
.ka-spotlight-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9980;
  opacity: 0;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.ka-spotlight-overlay.is-active {
  opacity: 1;
}

.ka-spotlight-panel {
  position: fixed;
  pointer-events: none;
  background: var(--ka-spotlight-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  will-change: top, left, width, height;
}

/* Hedef Çerçevesi & Glow */
.ka-spotlight-ring {
  position: fixed;
  border-radius: 16px;
  box-shadow: 0 0 0 3px var(--ka-spotlight-glow), 0 0 28px var(--ka-spotlight-shadow);
  pointer-events: none;
  z-index: 9985;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Pusula Spotlight Bilgi Kartı */
.ka-spotlight-card {
  position: fixed;
  z-index: 9995;
  pointer-events: auto;
  background: var(--ka-spotlight-card-bg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: 0 16px 40px -8px rgba(10, 25, 60, 0.22), 0 4px 12px rgba(10, 25, 60, 0.08);
  width: min(340px, calc(100vw - 32px));
  padding: 18px 20px 14px;
  color: #0f172a;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.ka-spotlight-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ka-spotlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ka-spotlight-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ka-spotlight-bot-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #3479e4);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.ka-spotlight-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.ka-spotlight-close {
  background: transparent;
  border: none;
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 14px;
}

.ka-spotlight-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ka-spotlight-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #334155;
  margin: 0 0 14px;
}

.ka-spotlight-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ka-spotlight-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  background: #3479e4;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.ka-spotlight-btn-primary:hover {
  background: #235fbd;
  color: #ffffff;
}

.ka-spotlight-btn-secondary {
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.ka-spotlight-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ka-spotlight-meta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}

.ka-spotlight-meta-footer button {
  background: transparent;
  border: none;
  padding: 0;
  color: #64748b;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s;
}

.ka-spotlight-meta-footer button:hover {
  color: #0f172a;
}

/* Ok Göstergesi */
.ka-spotlight-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--ka-spotlight-card-bg);
  transform: rotate(45deg);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.ka-spotlight-arrow.arrow-top {
  top: -7px;
  left: 28px;
  border-bottom: none;
  border-right: none;
}

.ka-spotlight-arrow.arrow-bottom {
  bottom: -7px;
  left: 28px;
  border-top: none;
  border-left: none;
}

.ka-spotlight-arrow.arrow-left {
  left: -7px;
  top: 24px;
  border-top: none;
  border-right: none;
}

.ka-spotlight-arrow.arrow-right {
  right: -7px;
  top: 24px;
  border-bottom: none;
  border-left: none;
}

/* Erişilebilirlik ve Performans: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .ka-spotlight-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 25, 60, 0.35) !important;
    transition: none !important;
  }
  .ka-spotlight-overlay,
  .ka-spotlight-card,
  .ka-spotlight-ring {
    transition: none !important;
    transform: none !important;
  }
}

/* Mobil Cihazlar (<768px): Performans ve Yerleşim Optimizasyonu */
@media (max-width: 767.98px) {
  .ka-spotlight-panel {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 25, 60, 0.22) !important;
  }
  .ka-spotlight-card {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    top: auto !important;
    width: auto !important;
    max-width: 100% !important;
    border-radius: 14px;
  }
  .ka-spotlight-arrow {
    display: none;
  }
}
