/* Mevzuat Araştırma Sol Panel Stilleri */
#legislation-sidebar {
  position: fixed;
  top: 48px;
  left: 0;
  bottom: 26px;
  width: 390px;
  max-width: 92vw;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#legislation-sidebar.open {
  transform: translateX(0);
}

/* Editör alanı sol panel açılınca sağa kayar (geniş ekranlarda) */
@media (min-width: 1180px) {
  body.mv-sidebar-open .ude-editor-root {
    margin-left: 390px;
    transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* Yüzen Açma Butonu (Sol Üst) */
#mv-floating-trigger {
  position: fixed;
  top: 94px;
  left: 14px;
  z-index: 990;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 6px 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

#mv-floating-trigger:hover {
  background: #f8fafc;
  border-color: #6366f1;
  color: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Header */
.mv-header {
  padding: 12px 16px 10px 16px;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  flex-shrink: 0;
}

.mv-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mv-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.mv-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mv-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
  color: #64748b;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.mv-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Sekmeler */
.mv-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px 10px 0 10px;
  gap: 4px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.mv-tab {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s;
}

.mv-tab:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.5);
}

.mv-tab.active {
  background: #f8fafc;
  color: #4338ca;
  border-color: #e2e8f0;
  margin-bottom: -1px;
  padding-bottom: 8px;
}

.mv-tab-badge {
  background: #4f46e5;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.mv-citation-sub {
  font-size: 11px;
  color: #4338ca;
  font-weight: 600;
}

.mv-trigger-count {
  background: #4f46e5;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.mv-offline-bar {
  padding: 6px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.mv-offline-bar.is-offline {
  background: #fef3c7;
  color: #92400e;
  border-top-color: #fde68a;
}

.mv-sync-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  cursor: pointer;
  white-space: nowrap;
}

.mv-sync-btn:hover {
  border-color: #6366f1;
  color: #4338ca;
}

/* Arama ve Hızlı Kanun Alanı */
.mv-search-section {
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.mv-search-row {
  display: flex;
  gap: 6px;
}

.mv-search-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.mv-search-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.mv-search-btn {
  padding: 7px 12px;
  background: #4f46e5;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.mv-search-btn:hover {
  background: #4338ca;
}

.mv-search-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.mv-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.mv-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.mv-chip:hover {
  border-color: #6366f1;
  color: #4338ca;
  background: #eef2ff;
}

.mv-chip.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

/* Aktif Kanun Barı */
.mv-active-law-bar {
  padding: 10px 14px;
  background: #eef2ff;
  border-bottom: 1px solid #c7d2fe;
  flex-shrink: 0;
}

.mv-active-law-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.mv-active-law-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e1b4b;
  line-height: 1.3;
}

.mv-active-law-meta {
  font-size: 11px;
  color: #4338ca;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mv-active-law-meta a {
  color: #4338ca;
  text-decoration: underline;
}

.mv-back-btn {
  background: #ffffff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  cursor: pointer;
  white-space: nowrap;
}

.mv-back-btn:hover {
  background: #e0e7ff;
}

.mv-inlaw-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.mv-inlaw-input {
  flex: 1;
  min-width: 0;
  padding: 5px 9px;
  font-size: 12px;
  border: 1px solid #a5b4fc;
  border-radius: 5px;
  background: #ffffff;
  outline: none;
}

.mv-inlaw-input:focus {
  border-color: #4f46e5;
}

/* Sonuç Listesi */
.mv-results-list {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  padding: 12px 14px 28px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mv-results-list::-webkit-scrollbar {
  width: 6px;
}

.mv-results-list::-webkit-scrollbar-track {
  background: transparent;
}

.mv-results-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.mv-results-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.mv-empty-state {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.5;
}

.mv-empty-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

/* Kanun Sonuç Kartı */
.mv-law-card {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.mv-law-card:hover {
  border-color: #6366f1;
  background: #fafbff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.mv-law-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
}

.mv-law-card-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mv-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
}

.mv-badge-info {
  background: #e0e7ff;
  color: #3730a3;
}

.mv-badge-warn {
  background: #fef3c7;
  color: #92400e;
}

.mv-badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.mv-badge-ok {
  background: #dcfce7;
  color: #166534;
}

/* Madde Kartı */
.mv-article-card {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  overflow: visible;
  word-wrap: break-word;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.mv-article-header {
  padding: 9px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #edf2f7;
  border-radius: 8px 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mv-article-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mv-article-num {
  font-size: 13px;
  font-weight: 700;
  color: #312e81;
}

.mv-article-title {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.mv-article-body {
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #1e293b;
}

.mv-article-body p {
  margin: 0 0 7px 0;
}

.mv-article-body p:last-child {
  margin-bottom: 0;
}

.mv-amend-highlight {
  background: #fef3c7;
  color: #78350f;
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 600;
}

.mv-search-highlight {
  background: #fde047;
  color: #0f172a;
  padding: 0 2px;
  border-radius: 2px;
}

.mv-footnotes {
  margin: 0 12px 10px 12px;
  padding: 8px 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #78350f;
}

.mv-footnotes-title {
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
  color: #92400e;
}

.mv-footnote-item {
  margin-bottom: 4px;
}

.mv-footnote-item:last-child {
  margin-bottom: 0;
}

.mv-article-actions {
  padding: 7px 12px;
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
  border-radius: 0 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mv-action-group {
  display: flex;
  gap: 6px;
}

.mv-btn-sm {
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.mv-btn-sm:hover {
  border-color: #6366f1;
  color: #4338ca;
  background: #eef2ff;
}

.mv-btn-primary-sm {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.mv-btn-primary-sm:hover {
  background: #4338ca;
  border-color: #4338ca;
  color: #ffffff;
}

.mv-nav-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.mv-loading {
  text-align: center;
  padding: 28px 16px;
  color: #475569;
  font-size: 12.5px;
}
