/* Dinamik Ek Listesi ve EK- Otomatik Tamamlama Stilleri */
#ek-header-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}

.ek-header-btn {
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  user-select: none;
  white-space: nowrap;
}

.ek-header-btn:hover {
  background: #f8fafc;
  border-color: #0ea5e9;
  color: #0369a1;
}

.ek-status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.ek-status-pill.on {
  background: #dcfce7;
  color: #166534;
}

.ek-status-pill.off {
  background: #f1f5f9;
  color: #64748b;
}

.ek-count-badge {
  background: #0284c7;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Yönetim Popover Paneli */
#ek-popover {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  max-width: 94vw;
  max-height: 75vh;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  z-index: 1200;
  display: none;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#ek-popover.open {
  display: flex;
}

.ek-pop-header {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ek-pop-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ek-toggle-row {
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ek-toggle-label {
  font-size: 12px;
  color: #334155;
  line-height: 1.35;
}

.ek-toggle-label strong {
  display: block;
  color: #0f172a;
}

.ek-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.ek-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ek-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 22px;
}

.ek-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ek-switch input:checked + .ek-slider {
  background-color: #0284c7;
}

.ek-switch input:checked + .ek-slider:before {
  transform: translateX(18px);
}

.ek-pop-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ek-item-row {
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 8px 10px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ek-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ek-num-tag {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.ek-desc-input {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  color: #0f172a;
  outline: none;
}

.ek-desc-input:focus {
  border-color: #0284c7;
}

.ek-item-ctx {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ek-pop-footer {
  padding: 10px 14px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.ek-btn:hover {
  border-color: #0284c7;
  color: #0369a1;
}

.ek-btn-primary {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.ek-btn-primary:hover {
  background: #0369a1;
  border-color: #0369a1;
  color: #ffffff;
}

/* EK- Yazınca Açılan Hızlı Tanımlama Penceresi */
#ek-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  z-index: 1500;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}

#ek-prompt-overlay.open {
  display: flex;
}

#ek-prompt-card {
  width: 420px;
  max-width: 92vw;
  background: #ffffff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
  padding: 14px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ek-prompt-title {
  font-size: 14px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ek-prompt-sub {
  font-size: 11.5px;
  color: #475569;
  margin-bottom: 10px;
  line-height: 1.4;
}

.ek-prompt-note {
  font-size: 11px;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 5px;
  padding: 5px 8px;
  margin-bottom: 10px;
}

.ek-prompt-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 13px;
  border: 1.5px solid #0284c7;
  border-radius: 6px;
  outline: none;
  color: #0f172a;
}

.ek-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.ek-existing-wrap {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.ek-existing-title {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.ek-existing-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 150px;
  overflow-y: auto;
}

.ek-existing-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  color: #1e293b;
  transition: all 0.12s;
}

.ek-existing-item:hover {
  border-color: #0284c7;
  background: #e0f2fe;
}

.ek-existing-desc {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
