/* Custom Variable Definitions */
:root {
  --bg: #0e3040;
  --panel: #124054;
  --panel-2: #124054;
  --menu-color: #124054;
  --text: #e7f3f9;
  --muted: #8fb0c2;
  --accent: #7be3ff;
  --accent-2: #ffa117;
  --text-color-dark: #0e3040;
  --border: rgba(255, 255, 255, 0.12);
  --shadow-dark: 0 16px 32px rgba(0, 0, 0, 0.6);
  --radius-soft: 8px;
  --radius-pill: 999px;
  --radius-card: 12px;
  --font-size-small: 13px;
  --font-size-body: 14px;
  --font-size-head: 15px;
}

/* Base Styling */
.wrap-watchlist-page {
  padding-top: 15px;
  margin: 0;
  background: var(--bg);
  background: var(--bg-color);
  color: var(--text);
  /* Poppins as the primary font */
  font-family: 'Poppins', sans-serif !important;
  font-size: var(--font-size-body);
}

/* Toolbar Styling */
.toolbar {
  background: var(--menu-color);
  padding: 8px 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  border-radius: var(--radius-card);
  font-family: 'Poppins', sans-serif !important;
  /* border-bottom: 1px solid var(--border); */
}

.toolbar input {
  flex-grow: 1;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-soft);
  font-size: var(--font-size-body);
  font-family: 'Poppins', sans-serif !important;
}

.toolbar button {
  padding: 8px 15px;
  background: var(--accent);
  /* Using primary accent for buttons */
  border: none;
  color: var(--text-color-dark);
  /* Dark text on bright button */
  border-radius: var(--radius-soft);
  cursor: pointer;
  transition: background 0.2s;
  font-size: var(--font-size-small);
  font-weight: bold;
  font-family: 'Poppins', sans-serif !important;
}

.toolbar button:hover {
  background: #50c4e0;
  /* Slightly darker accent on hover */
}

/* Grid and Widget Styling */
.grid-stack {
  background: var(--bg);
  background: var(--bg-color);
  padding: 8px;
  height: calc(100vh - 47px);
}

.grid-stack-item-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 15px;
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-dark);
}

.grid-stack-item-content h3 {
  color: var(--accent);
  /* Accent color for widget headers */
  font-size: var(--font-size-head);
  margin-top: 0;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
  font-weight: bold;
}

/* Close Button on Widget */
.widget-close {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.2em;
  font-weight: bold;
  line-height: 1;
  transition: color 0.2s;
}

.widget-close:hover {
  color: var(--text);
}

/* Data Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-small);
  /* Keeping monospaced for financial data alignment */
  /* font-family: 'Roboto Mono', monospace, sans-serif;  */
}

table th,
table td {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px dotted var(--border);
}

table th {
  color: var(--muted);
  font-weight: normal;
  font-size: 0.9em;
}

/* Price Movement Colors */
.up {
  color: #00ff00;
  /* Green */
  font-weight: bold;
}

.down {
  color: #ff3333;
  /* Red */
  font-weight: bold;
}

.unchanged {
  color: var(--muted);
  font-weight: normal;
}

/* News List Styling */
.widget-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-body li {
  margin-bottom: 8px;
  border-left: 3px solid var(--accent-2);
  /* Secondary accent for list items */
  padding-left: 8px;
  font-size: var(--font-size-small);
}

.widget-body strong {
  color: var(--text);
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
}

.modal-content {
  background: var(--panel-2);
  margin: 10% auto;
  padding: 20px;
  width: 350px;
  border-radius: var(--radius-soft);
  color: var(--text);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-dark);
}

.modal-content label {
  font-size: var(--font-size-body);
}

.modal-content h3 {
  color: var(--accent);
}

@media screen and (min-width: 1601px) {
  .page-template-tpl-watchlists .layout {
    grid-template-columns: 0 1fr 0;
  }
}