/* Evraklık Global Arama paneli + Nasıl Kullanılır video modalı */

.egs-panel {
  --egs-bg: #ffffff;
  --egs-text: #0f172a;
  --egs-muted: #64748b;
  --egs-border: #e2e8f0;
  --egs-hover: var(--ev-accent-soft,#F4F1FF);
  --egs-accent: var(--primary, var(--ev-accent,#6B3DED));
  --egs-mark: var(--ev-accent-soft-2,#EAE4FE);
  position: fixed;
  z-index: 100000;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--egs-bg);
  color: var(--egs-text);
  border: 1px solid var(--egs-border);
  border-radius: 14px;
  box-shadow: 0 18px 48px -12px rgba(15, 23, 42, 0.28);
  padding: 6px;
  font-size: 0.92rem;
}
html.dark-theme .egs-panel {
  --egs-bg: #111827;
  --egs-text: #f1f5f9;
  --egs-muted: #94a3b8;
  --egs-border: #273244;
  --egs-hover: #1e293b;
  --egs-accent: #a78bfa;
  --egs-mark: rgba(167, 139, 250, 0.22);
}

.egs-group + .egs-group { border-top: 1px solid var(--egs-border); margin-top: 4px; padding-top: 4px; }
.egs-group-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--egs-muted);
  padding: 8px 10px 4px;
}

.egs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.egs-item.is-active,
.egs-item:hover,
.egs-item:focus-visible { background: var(--egs-hover); outline: none; }
.egs-item-icon {
  flex: 0 0 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--egs-hover);
  font-size: 1.05rem;
}
.egs-item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.egs-item-title { font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.egs-item-sub { font-size: 0.8rem; color: var(--egs-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.egs-item-badge {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--egs-accent);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.egs-hl { background: var(--egs-mark); color: inherit; border-radius: 3px; padding: 0 1px; }

.egs-status { padding: 16px 12px; color: var(--egs-muted); }
.egs-empty { padding: 18px 14px; }
.egs-empty-title { font-weight: 800; margin-bottom: 4px; }
.egs-empty-sub { color: var(--egs-muted); font-size: 0.86rem; margin-bottom: 12px; }
.egs-empty-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.egs-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--egs-accent);
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none;
}
.egs-btn-ghost { background: transparent; color: var(--egs-accent) !important; border: 1px solid var(--egs-border); }

.egs-foot {
  display: block;
  margin-top: 4px;
  padding: 12px 10px;
  border-top: 1px solid var(--egs-border);
  color: var(--egs-accent);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 10px 10px;
}
.egs-foot:hover { background: var(--egs-hover); }

/* ---------- Nasıl Kullanılır? butonu ---------- */
.evraklik-howto-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--ev-accent-line,#D8CCFB);
  background: var(--ev-accent-soft,#F4F1FF);
  color: var(--ev-accent-deep,#4B26B3);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
}
.evraklik-howto-btn .evraklik-howto-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ev-accent,#6B3DED);
  color: #ffffff;
  font-size: 0.7rem;
}
.evraklik-howto-btn:hover { background: var(--ev-accent-soft-2,#EAE4FE); }
html.dark-theme .evraklik-howto-btn { background: rgba(167, 139, 250, 0.14); border-color: #4c3a8a; color: var(--ev-accent-line,#D8CCFB); }
.evraklik-howto-wrap { display: flex; justify-content: flex-end; margin: 0 0 14px; }

/* ---------- Video modalı ---------- */
html.egs-lock { overflow: hidden; }
.egs-video-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.egs-video-modal[hidden] { display: none; }
.egs-video-box {
  width: min(960px, 100%);
  background: #0b1220;
  color: #f1f5f9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.egs-video-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; }
.egs-video-title { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.egs-video-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
}
.egs-video-close:hover { background: rgba(255, 255, 255, 0.16); }
.egs-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.egs-video-frame iframe,
.egs-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.egs-video-error { padding: 40px 16px; text-align: center; color: #cbd5e1; }
.egs-video-foot { padding: 8px 16px 12px; text-align: right; min-height: 8px; }
.egs-video-link { color: #c4b5fd; font-weight: 700; font-size: 0.85rem; text-decoration: none; }
