/* To make full screen (Responsive as well) */
html,
body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Popup Styles */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.popup.active {
  display: flex;
}

.popup-content {
  background: #fff;
  max-width: 400px;
  width: 90%;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: #007bff;
}

.popup-content h2 {
  font-size: 20px;
  color: #333;
  margin: 0 0 20px;
  font-weight: bold;
}

.popup-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.popup-option {
  display: block;
  padding: 12px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.3s;
}

.popup-option:hover {
  background: #0056b3;
}

.popup-option.disabled {
  background: #ccc;
  cursor: not-allowed;
}

.popup-option.disabled:hover {
  background: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
  .popup {
    z-index: 5000; /* Ensure above Flasher (1300) and header (1100) */
    align-items: flex-start; /* Start from top to avoid header overlap */
  }
  .popup-content {
    width: 75%; /* Slightly smaller for small screens */
    max-width: 280px; /* Reduced max-width */
    padding: 12px; /* Reduced padding */
    margin-top: 150px; /* Clear Flasher and header */
  }
  .popup-content h2 {
    font-size: 16px; /* Smaller heading */
    margin: 0 0 15px;
  }
  .popup-option {
    font-size: 12px; /* Smaller font */
    padding: 8px; /* Reduced padding */
  }
  .close-btn {
    font-size: 20px; /* Smaller but visible */
    top: 12px;
    right: 12px;
    padding: 6px; /* Adequate tap area */
    background: rgba(255, 255, 255, 0.9); /* Background for visibility */
    border-radius: 50%;
  }
}

@media (max-width: 480px) {
  .popup-content {
    width: 75%;
    max-width: 260px; /* Even smaller for very small screens */
    padding: 10px;
    margin-top: 160px; /* More offset for very small screens */
  }
  .popup-content h2 {
    font-size: 14px;
    margin: 0 0 12px;
  }
  .popup-option {
    font-size: 11px;
    padding: 7px;
  }
  .close-btn {
    font-size: 18px;
    top: 10px;
    right: 10px;
    padding: 5px;
  }
}