/* zz-view-level.css — 361 Web UI (m.html) Sade ↔ Uzman Görünüm Mimarisi
   Kurallar: Spatial Shell rayları (#PageZone_LeftNavs / #PageZone_RightNavs) ASLA display:none yapılmaz;
   yalnız iç gruplar ve öğe düzeyindeki görünürlük kuralları uygulanır. */

/* ── 1. Bildirimsel & Dinamik Görünüm Seviyesi Kuralları ── */
html[data-gorunum="sade"] .ViewLevel_Expert:not(.wus-failopen-reveal):not(.wus-pinned-simple):not(.wus-force-visible),
html[data-gorunum="sade"] body #MainContent#MainContent#MainContent .Content .ContentHeader .Panel_kpis > .AggregateView.ViewLevel_Expert:not(.wus-failopen-reveal):not(.wus-pinned-simple):not(.wus-force-visible),
html[data-gorunum="sade"] body #MainContent#MainContent#MainContent .Content .Panel.ContentHeader .Panel_kpis > .AggregateView.ViewLevel_Expert:not(.wus-failopen-reveal):not(.wus-pinned-simple):not(.wus-force-visible),
html[data-gorunum="sade"] body #MainContent#MainContent#MainContent .AggregateView.ViewLevel_Expert:not(.wus-failopen-reveal):not(.wus-pinned-simple):not(.wus-force-visible),
html[data-gorunum="sade"] body #MainContent#MainContent#MainContent .Panel.ViewLevel_Expert:not(.wus-failopen-reveal):not(.wus-force-visible) {
  display: none !important;
}
html[data-gorunum="uzman"] .ViewLevel_Simple:not(.wus-force-visible) {
  display: none !important;
}

/* Dinamik CSS geçiş yumuşaklığı (reduced-motion saygılı) */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 200ms;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

/* ── 2. #UserMenuPopup Kontrol Kutusu (K2: Yalnız UserMenu + Alt+1/2, TopBar 0px) ── */
.m361-gorunum-kutu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.72);
  font-size: 12px;
  flex-shrink: 0;
}
.m361-gorunum-kutu.is-compact-slot {
  padding: 0;
  border-top: 0;
  background: transparent;
  gap: 0;
  width: auto;
}
html.dark-theme .m361-gorunum-kutu:not(.is-compact-slot),
html[data-theme="dark"] .m361-gorunum-kutu:not(.is-compact-slot) {
  background: rgba(15, 23, 42, 0.6);
  border-top-color: rgba(148, 163, 184, 0.2);
}
.m361-gorunum-ust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.m361-gorunum-detay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--um-border, rgba(148, 163, 184, 0.35));
  background: var(--um-bg, transparent);
  color: var(--um-text-secondary, inherit);
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
  transition: background-color 120ms ease, transform 140ms ease;
}
.m361-gorunum-detay-btn.is-open svg {
  transform: rotate(180deg);
}
@media (hover: hover) {
  .m361-gorunum-detay-btn:hover {
    background: var(--um-surface-hover, rgba(148, 163, 184, 0.14));
  }
}
.m361-gorunum-detay {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 7px;
  margin-top: 5px;
  border-top: 1px solid var(--um-divider, rgba(148, 163, 184, 0.2));
}
.m361-gorunum-detay[hidden] {
  display: none !important;
}
.m361-gorunum-baslik {
  font-weight: 700;
  font-size: 12px;
  color: inherit;
}
.m361-gorunum-kisayol {
  font-size: 10.5px;
  opacity: 0.7;
  font-weight: 600;
}
.m361-gorunum-seg {
  display: inline-flex;
  gap: 3px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.7);
}
html.dark-theme .m361-gorunum-seg,
html[data-theme="dark"] .m361-gorunum-seg {
  background: rgba(30, 41, 59, 0.85);
}
.m361-gorunum-btn {
  border: none;
  border-radius: 999px;
  padding: 4px 11px;
  min-height: 28px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: inherit;
  transition: background 140ms ease, color 140ms ease;
}
.m361-gorunum-btn.is-aktif[data-seviye="sade"] {
  background: #059669;
  color: #ffffff;
}
.m361-gorunum-btn.is-aktif[data-seviye="uzman"] {
  background: #6d28d9;
  color: #ffffff;
}
.m361-scope-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.m361-scope-lbl {
  font-size: 11px;
  opacity: 0.78;
  margin-right: auto;
}
.m361-scope-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.m361-scope-btn.is-aktif {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
html.dark-theme .m361-scope-btn.is-aktif,
html[data-theme="dark"] .m361-scope-btn.is-aktif {
  color: #93c5fd;
  border-color: #60a5fa;
}
.m361-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}
.m361-pref-chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 500;
}
.m361-action-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.m361-mini-act {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.m361-mini-act:hover {
  background: rgba(148, 163, 184, 0.14);
}
.m361-mini-act.is-aktif {
  border-color: #059669;
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
}

/* ── 3. Form Katlı FieldSet Akordeonu & Fail-Open Validation ── */
html[data-gorunum="sade"] .wus-folded-fs {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  margin: 8px 0;
  background: rgba(248, 250, 252, 0.65);
  width: 100%;
  box-sizing: border-box;
}
html.dark-theme[data-gorunum="sade"] .wus-folded-fs,
html[data-theme="dark"][data-gorunum="sade"] .wus-folded-fs {
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(148, 163, 184, 0.24);
}
.wus-folded-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  min-height: 38px;
}
.wus-folded-hdr:hover {
  background: rgba(148, 163, 184, 0.1);
}
.wus-folded-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
html.dark-theme .wus-folded-badge,
html[data-theme="dark"] .wus-folded-badge {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.2);
}
html[data-gorunum="sade"] .wus-folded-fs.is-collapsed > .FieldSetContent,
html[data-gorunum="sade"] .wus-folded-fs.is-collapsed > *:not(.wus-folded-hdr) {
  display: none !important;
}

.wus-form-more-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed rgba(100, 116, 139, 0.4);
  background: rgba(241, 245, 249, 0.6);
  font-size: 12px;
}
html.dark-theme .wus-form-more-bar,
html[data-theme="dark"] .wus-form-more-bar {
  background: rgba(30, 41, 59, 0.6);
}
.wus-form-more-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 7px;
  padding: 6px 12px;
  min-height: 34px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
html.dark-theme .wus-form-more-btn,
html[data-theme="dark"] .wus-form-more-btn {
  background: #1e293b;
  color: #f8fafc;
  border-color: #475569;
}

.wus-failopen-reveal {
  display: block !important;
  outline: 2px solid #dc2626 !important;
  outline-offset: 3px;
  border-radius: 8px;
  background: rgba(254, 242, 242, 0.72) !important;
}
html.dark-theme .wus-failopen-reveal,
html[data-theme="dark"] .wus-failopen-reveal {
  background: rgba(127, 29, 29, 0.25) !important;
}

/* ── 4. EntityTypeView Sade Kolon, Liste Çipleri & Uzman Araç Çekmecesi ── */
html[data-gorunum="sade"] #MainContent#MainContent#MainContent .EntityTypeView .wus-col-expert:not(.wus-revealed),
html[data-gorunum="sade"] #MainContent#MainContent#MainContent .EntityTypeView table.ListTable col.wus-col-expert:not(.wus-revealed),
html[data-gorunum="sade"] #MainContent#MainContent#MainContent .EntityTypeView table.ListTable td.wus-col-expert:not(.wus-revealed),
html[data-gorunum="sade"] #MainContent#MainContent#MainContent .EntityTypeView table.ListTable th.wus-col-expert:not(.wus-revealed) {
  display: none !important;
}
html[data-gorunum="sade"] .wus-etv-expert-tool:not(.wus-revealed) {
  display: none !important;
}
.wus-etv-more-btn,
.wus-rev-more-btn,
.wus-nav-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  align-self: center;
  flex: 0 0 auto !important;
  width: auto !important;
  height: auto !important;
  min-width: auto !important;
  max-width: max-content !important;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(248, 250, 252, 0.94);
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 32px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
html.dark-theme .wus-etv-more-btn,
html.dark-theme .wus-rev-more-btn,
html.dark-theme .wus-nav-more-btn,
html[data-theme="dark"] .wus-etv-more-btn,
html[data-theme="dark"] .wus-rev-more-btn,
html[data-theme="dark"] .wus-nav-more-btn {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

.wus-list-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 0 8px;
}
.wus-list-chip {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 4px 11px;
  min-height: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wus-list-chip.is-aktif {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
html.dark-theme .wus-list-chip.is-aktif,
html[data-theme="dark"] .wus-list-chip.is-aktif {
  background: #3b82f6;
  border-color: #3b82f6;
}

/* ── 5. Content, SimpleLayout & AggregateView ── */
.wus-entity-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(5, 150, 105, 0.25);
  background: rgba(236, 253, 245, 0.72);
  color: #064e3b;
  font-size: 13px;
  font-weight: 600;
}
html.dark-theme .wus-entity-question,
html[data-theme="dark"] .wus-entity-question {
  background: rgba(6, 78, 59, 0.28);
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.3);
}
html[data-gorunum="sade"] .SimpleLayout_Bento3x3 > .Panel_b {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
html[data-gorunum="sade"] .wus-folded-panel.is-collapsed > *:not(.wus-folded-hdr) {
  display: none !important;
}

/* ── 6. SimpleWidget (Chips / QuickDate / Stepper) & Wizard ── */
.wus-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.wus-chip {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #ffffff;
  color: #1e293b;
  border-radius: 999px;
  padding: 5px 12px;
  min-height: 32px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wus-chip.is-secili {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
html.dark-theme .wus-chip,
html[data-theme="dark"] .wus-chip {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}
.wus-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}
.wus-stepper-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.wus-wizard-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.8);
}
html.dark-theme .wus-wizard-bar,
html[data-theme="dark"] .wus-wizard-bar {
  background: rgba(30, 41, 59, 0.8);
}
.wus-wizard-step {
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wus-wizard-step.is-aktif {
  background: #2563eb;
  color: #ffffff;
}
.wus-wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

/* ── 7. Süreç Şeridi, İnsan Dili Hata Kartı, Sözlük & X-Ray Peek ── */
.wus-process-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.22);
  font-size: 12px;
}
html.dark-theme .wus-process-strip,
html[data-theme="dark"] .wus-process-strip {
  background: rgba(30, 58, 138, 0.25);
}
.wus-err-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #7f1d1d;
  font-size: 12.5px;
}
html.dark-theme .wus-err-card,
html[data-theme="dark"] .wus-err-card {
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.45);
}
.wus-err-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wus-gloss-btn,
.wus-xray-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  min-width: 22px;
  min-height: 22px;
  margin-left: 4px;
  cursor: pointer;
  opacity: 0.72;
}
.wus-gloss-btn:hover,
.wus-xray-btn:hover {
  opacity: 1;
  border-color: #2563eb;
  color: #2563eb;
}
.wus-xray-pop {
  position: fixed;
  z-index: 2147482900;
  max-width: 360px;
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.36);
  font-size: 12px;
  line-height: 1.45;
}
.wus-xray-pop[hidden] {
  display: none !important;
}
.wus-xray-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin-top: 6px;
}
.wus-xray-k {
  color: #94a3b8;
  font-weight: 600;
}
.wus-xray-v {
  color: #f8fafc;
  word-break: break-word;
}

/* ── 8. Adaptive Nudge, Workday Strip, Sunum Kipi ── */
.wus-nudge-bar,
.wus-workday-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.9);
  font-size: 12.5px;
}
html.dark-theme .wus-nudge-bar,
html.dark-theme .wus-workday-strip,
html[data-theme="dark"] .wus-nudge-bar,
html[data-theme="dark"] .wus-workday-strip {
  background: rgba(30, 41, 59, 0.85);
}
.wus-field-hint {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #64748b;
}
html.dark-theme .wus-field-hint,
html[data-theme="dark"] .wus-field-hint {
  color: #94a3b8;
}
html[data-gorunum="uzman"] .wus-field-hint {
  display: none;
}

/* Sunum Kipi (Toplantı / TV) */
html.wus-presentation-mode body {
  font-size: 15px !important;
}
html.wus-presentation-mode .ActionPanel,
html.wus-presentation-mode .wus-xray-btn,
html.wus-presentation-mode .wus-form-more-bar {
  display: none !important;
}

/* Spatial-Shell Ray İçi Sade Katlama (Rayın kendisi asla gizlenmez) */
html[data-gorunum="sade"] .wus-nav-expert-group.is-collapsed .wus-nav-expert-items,
html[data-gorunum="sade"] .wus-nav-expert-group.is-collapsed .NavGroupBody {
  display: none !important;
}

/* ── 9. Mobil Ergonomi (≤640px) ── */
@media (max-width: 640px) {
  .m361-gorunum-btn,
  .m361-gorunum-detay-btn,
  .m361-scope-btn,
  .m361-mini-act,
  .wus-form-more-btn,
  .wus-etv-more-btn,
  .wus-chip,
  .wus-stepper-btn {
    min-height: 44px;
  }
  .m361-gorunum-detay-btn {
    min-width: 44px;
  }
  .wus-xray-pop {
    left: 12px !important;
    right: 12px !important;
    bottom: 14px !important;
    top: auto !important;
    max-width: none;
  }
}
