.watchlist-webapp-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

.watchlist-webapp-sidebar {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  max-width: 200px;
  border-right: solid 1px var(--border-color);
  position: relative;
}

.watchlist-webapp-sidebar-center {
  padding-top: 5px;
  border-top: solid 1px var(--border-color);
}

.watchlist-webapp-sidebar-center h3 {
  margin: 0;
  padding: 5px;
  margin-bottom: 20px;
}

.watchlist-webapp-sidebar-actions {
  padding:2px;
  height: 40px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.watchlist-webapp-sidebar-actions-button {
  flex: 1;
  cursor: pointer;
  background: var(--blue);
  border-radius: 4px;
  border: none;
  color: #fff;
  transition: 0.2s;
  display:flex;
  justify-content: center;
  align-items: center;
} 

.watchlist-webapp-sidebar-actions-button:hover {
  background-color: var(--blue-darker);
}

.watchlist-webapp-sidebar-actions-button svg {
  width: 16px;
  height: 16px;
}

.watchlist-webapp-content {
  width: 100%;
  /*display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);*/
  display: flex;
  flex-wrap: wrap;
}

.watchlist-webapp-grid-1,
.watchlist-webapp-grid-2,
.watchlist-webapp-grid-3,
.watchlist-webapp-grid-4 {
  flex: 1 1 33%;  /* All items take up 1/3 of the width */
  /*display: flex;
  justify-content: center;
  align-items: center;*/
  display: block;
  overflow: auto;
  border: solid 1px var(--border-color);
  box-sizing: border-box;
}

.watchlist-webapp-grid-1,
.watchlist-webapp-grid-3 {
  flex: 1 1 66%;  /* Grid 1 and 3 will take up 2/3 of the width */
}

/*
.watchlist-webapp-grid-1 {
  grid-column: 1 / 3;
  display: flex;
  justify-content: center;
  align-items: center;
  border:solid 1px var(--border-color);
}

.watchlist-webapp-grid-2 {
  grid-column: 3 / 5;
  display: flex;
  justify-content: center;
  align-items: center;
  border:solid 1px var(--border-color);
}

.watchlist-webapp-grid-3 {
  grid-column: 1 / 3;
  display: flex;
  justify-content: center;
  align-items: center;
  border:solid 1px var(--border-color);
}

.watchlist-webapp-grid-4 {
  grid-column: 3 / 5;
  display: flex;
  justify-content: center;
  align-items: center;
  border:solid 1px var(--border-color);
}*/

.watchlist-webapp-sidebar-footer {
  width: 100%;
  padding-top: 5px;
  margin-bottom: 5px;
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: solid 1px var(--border-color);
}


.watchlist-webapp-sidebar-footer a {
  font-weight: 600;
  text-decoration: none;
  color: var(--blue);
  transition: 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
}

.watchlist-webapp-sidebar-footer svg {
  width: 14px;
  height: 14px;
}

.watchlist-webapp-sidebar-footer a {
  color: var(--blue-darker);
}

/* Watchlist Table Styles */
.watchlist-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 5px;
}

.watchlist-table-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

.watchlist-actions {
  display: flex;
  gap: 10px;
}

.watchlist-actions button {
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-add-position {
  background-color: #4CAF50;
  color: white;
}

.btn-add-position:hover {
  background-color: #45a049;
}

.btn-update-position {
  background-color: #2196F3;
  color: white;
}

.btn-update-position:hover {
  background-color: #0b7dda;
}

.btn-remove-position {
  background-color: #f44336;
  color: white;
}

.btn-remove-position:hover {
  background-color: #da190b;
}

.watchlist-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.watchlist-table thead {
  background-color: #333;
  color: white;
}

.watchlist-table th,
.watchlist-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.watchlist-table tbody tr:hover {
  background-color: #f5f5f5;
}

.watchlist-table .positive {
  color: #4CAF50;
  font-weight: bold;
}

.watchlist-table .negative {
  color: #f44336;
  font-weight: bold;
}

.watchlist-table .neutral {
  color: #757575;
}

.watchlist-table .positive svg,
.watchlist-table .negative svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.watchlist-table .no-data {
  text-align: center;
  padding: 40px;
  color: #757575;
  font-style: italic;
}

.select-watchlist-message {
  text-align: center;
  padding: 60px 20px;
  color: #757575;
  font-size: 1.1rem;
}

/* Sidebar Active State */
.sidebar-watchlists-list li {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 4px;
  margin-bottom: 5px;
}

.sidebar-watchlists-list li:hover {
  background-color: #e0e0e0;
}

.sidebar-watchlists-list li.active {
  background-color: #2196F3;
  color: white;
  font-weight: bold;
}

/* Modal Styles */
.watchlist-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.watchlist-modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 30px;
  border: 1px solid #888;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  animation: slideDown 0.3s;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.watchlist-modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.watchlist-modal-close:hover,
.watchlist-modal-close:focus {
  color: #000;
}

.watchlist-modal h2 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #2196F3;
  padding-bottom: 10px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #2196F3;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

.form-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-primary {
  background-color: #2196F3;
  color: white;
}

.btn-primary:hover {
  background-color: #0b7dda;
}

.btn-secondary {
  background-color: #757575;
  color: white;
}

.btn-secondary:hover {
  background-color: #616161;
}

.btn-danger {
  background-color: #f44336;
  color: white;
}

.btn-danger:hover {
  background-color: #da190b;
}

.form-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.warning-text {
  color: #f44336;
  font-weight: bold;
  margin: 15px 0;
  text-align: center;
}

/* Error message styling */
.error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #f5c6cb;
  margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .watchlist-table-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .watchlist-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .watchlist-actions button {
    width: 100%;
  }
  
  .watchlist-modal-content {
    width: 95%;
    margin: 5% auto;
    padding: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}
