/* ── SHARED UI COMPONENTS ──────────────────────────── */

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-primary);
  pointer-events: all;
  animation: toastIn 0.2s ease;
  max-width: 280px;
}
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error   { border-left: 3px solid var(--accent-red); }
.toast.warn    { border-left: 3px solid var(--accent-yellow); }
@keyframes toastIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* Modal backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  min-width: 300px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary);
  font-size: 13px;
  font-weight: 600;
}
.modal-body { padding: 16px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-primary);
}

/* Buttons */
.btn {
  padding: 5px 14px;
  border-radius: var(--radius-md);
  font-size: 11px;
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
.btn:hover { border-color: var(--text-secondary); }
.btn-primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}
.btn-primary:hover { opacity: 0.88; }
.btn-danger {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
}

/* Form inputs */
.form-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 11px;
  padding: 5px 10px;
  width: 100%;
}
.form-input:focus { border-color: var(--border-accent); }
.form-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: block;
}
.form-group { margin-bottom: 12px; }

/* Select */
.form-select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 11px;
  padding: 5px 10px;
}

/* Color picker wrapper */
.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-primary);
  cursor: pointer;
}

/* Dropdown menu */
.dropdown {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 4px;
  z-index: 500;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.dropdown-item {
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dropdown-item:hover { background: var(--bg-tertiary); }
.dropdown-item.danger { color: var(--accent-red); }
.dropdown-sep {
  height: 1px;
  background: var(--border-secondary);
  margin: 3px 0;
}


/* drawing-settings-bar, dsb-*, dsd-* blokları chart modülüyle birlikte kaldırıldı */

/* ── NEWS PANEL & CARDS ────────────────────────────── */
.global-news-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--bg-secondary);
  height: 100%;
}
.gnp-header {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
  padding: 0 8px;
  height: 40px;
  flex-shrink: 0;
}
.gnp-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 0 12px;
  height: 100%;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.gnp-tab:hover {
  color: var(--text-primary);
}
.gnp-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-blue);
  font-weight: 600;
}
.gnp-body {
  flex: 1;
  overflow-y: auto;
  position: relative;
}
.gnp-content {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
}
.gnp-loading {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 11px;
}

/* News Cards */
.news-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
}
.news-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-1px);
}
.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}
.news-source {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-blue);
  font-weight: 600;
  text-transform: uppercase;
}
.news-time {
  color: var(--text-muted);
}
.news-title-en {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  /* clamp to 3 lines */
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-title-tr {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
  border-top: 1px dashed var(--border-secondary);
  padding-top: 6px;
  margin-top: 2px;
}

