.price-alert-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none; /* Initially hidden */
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.price-alert-modal-overlay.show {
  display: flex;
  opacity: 1;

}

.price-alert-modal {
  background: linear-gradient(135deg, rgba(30, 30, 36, 0.95), rgba(20, 20, 25, 0.97));
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 1000px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  animation: modalAppear 0.4s ease;
}

@keyframes modalAppear {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.price-alert-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #ccc;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.price-alert-close:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.price-alert-modal h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-weight: 500;
  font-size: 1.5rem;
  color: #fff;
  text-align: center;
}

.price-alert-credentials {
  background: rgba(20, 20, 25, 0.5);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.price-alert-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.price-alert-form-group {
  flex: 1 1 calc(33% - 1rem);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.price-alert-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #ccc;
  font-size: 0.9rem;
}

.price-alert-form-group input,
.price-alert-form-group select,
.price-alert-form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(30, 30, 36, 0.5);
  color: #fff;
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.price-alert-form-group input:focus,
.price-alert-form-group select:focus,
.price-alert-form-group textarea:focus {
  border-color: var(--brand-color, #3367D6);
  outline: none;
}

.price-alert-controls-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  width: 100%;
}

.price-alert-left-section {
  flex: 1;
}

.price-alert-center-section {
  flex: 2;
  display: flex;
  justify-content: center;
}

.price-alert-right-section {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.price-alert-checkbox-container {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.price-alert-checkbox-container input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.price-alert-checkbox-container label {
  color: #ccc;
  cursor: pointer;
}

.price-alert-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
  font-weight: 500;
  text-align: center;
  height: 36px;  /* Add fixed height */
  display: inline-flex;  /* Better vertical alignment */
  align-items: center;
  justify-content: center;
}

.price-alert-btn-primary {
  background-color: var(--brand-color, #3367D6);
  color: white;
}

.price-alert-btn-primary:hover {
  background-color: #2955b9;
}

.price-alert-btn-danger {
  background-color: #e74c3c;
  color: white;
}

.price-alert-btn-danger:hover {
  background-color: #c0392b;
}

.price-alert-btn-success {
  background-color: #2ecc71;
  color: white;
}

.price-alert-btn-success:hover {
  background-color: #27ae60;
}

.price-alert-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  min-width: 100%; /* Ensure minimum width */
  table-layout: fixed; /* More predictable sizing */
  display: table; /* Change from block to table */
  overflow-x: auto; /* Keep overflow handling */
}

.price-alert-table-container {
  width: 100%;
  overflow-x: auto;
}

.price-alert-table th,
.price-alert-table td {
  /* padding: 12px; */
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
  vertical-align: middle; /* Ensure ALL cells are middle-aligned */
  height: 60px; /* Set a consistent height for all rows */
}

.price-alert-table td.price-alert-status-active {
  color: #2ecc71 !important;
  font-weight: bold;
}

.price-alert-table td.price-alert-status-triggered {
  color: #f39c12 !important;
  font-weight: bold;
}

.price-alert-table td.price-alert-status-expired,
.price-alert-table td.price-alert-status-deleted {
  color: #e74c3c !important;
  font-weight: bold;
}

.price-alert-table th {
  background-color: rgba(20, 20, 25, 0.5);
  color: white;
  font-weight: 500;
  white-space: nowrap;
}

.price-alert-table tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.price-alert-action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start; /* Align to start of cell */
  height: 100%;
}

.price-alert-action-buttons button {
  margin: 0; /* Remove any default margins */
}

/* Explicitly set the size of the action column */
.price-alert-table th:last-child,
.price-alert-table td:last-child {
  width: 180px; /* Set a fixed width for the action column */
  padding: 0 12px; /* Consistent padding */
}

.price-alert-status-active {
  color: #2ecc71;
  font-weight: bold;
}

.price-alert-status-triggered {
  color: #f39c12;
  font-weight: bold;
}

.price-alert-status-expired,
.price-alert-status-deleted {
  color: #e74c3c;
  font-weight: bold;
}

.price-alert-message {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.price-alert-message.success {
  background-color: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.price-alert-message.error {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.price-alert-hide {
  display: none;
}

.price-alert-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
}

.price-alert-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid #3367D6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .price-alert-form-group {
    flex: 1 1 100%;
  }
  
  .price-alert-table {
    font-size: 0.9rem;
  }
  
  .price-alert-action-buttons {
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;  /* Add some vertical padding */
  }
  
  .price-alert-action-buttons button {
    width: 100%;  /* Make buttons take full width on mobile */
  }
}

@media (max-width: 640px) {
  .price-alert-controls-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .price-alert-left-section,
  .price-alert-center-section,
  .price-alert-right-section {
    width: 100%;
    justify-content: center;
  }
  
  .price-alert-right-section {
    justify-content: center;
  }
}


/* Container for the “?” icon */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin-left: 4px;
  font-weight: bold;
  color: white;
  z-index: 10; /* Ensure tooltip is above other elements */
}

/* Hidden by default */
.tooltip .tooltip-content {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  
  /* Positioning */
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  
  /* Styling */
  width: auto;            /* Auto width instead of fixed */
  max-width: 300px;       /* Maximum width constraint */
  min-width: 200px;       /* Minimum width for better readability */
  padding: 12px;
  font-size: 11.5px;
  line-height: 1.5em;
  color: black;
  background-color: #fafbfe;
  border: 1px solid #d8e3f0;
  border-radius: 10px;
  box-shadow: 1px 1px 8px rgba(45,62,80,0.12);
  z-index: 100;
  
  /* Text handling */
  word-wrap: break-word;   /* Wrap long words */
  overflow-wrap: break-word; /* Modern property for word wrapping */
  white-space: normal;     /* Allow text to wrap */
  text-align: left;        /* Ensure text is left-aligned */
  
  /* Prevent tooltip from going off-screen */
  right: auto;             /* Reset any right positioning */
}

/* Adjust positioning for tooltips that would go off the right edge */
.tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

/* Keep the arrow */
.tooltip .tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: #fafbfe transparent transparent transparent;
}

/* Add a media query for small screens */
@media (max-width: 480px) {
  .tooltip .tooltip-content {
    width: 220px;
    max-width: 90vw; /* Limit to 90% of viewport width */
    transform: translateX(-80%); /* Adjust position on small screens */
  }
}
