/* Simple Popup Styles */


/* Hidden by default */
.detail-popup,
.detail-popup.floating-element,
body .detail-popup,
body .detail-popup.floating-element {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 99999 !important;
  transform: none !important;
}

/* Show when active */
.detail-popup.active,
.detail-popup.floating-element.active,
body .detail-popup.active,
body .detail-popup.floating-element.active {
  display: block !important;
}

/* Dark overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1;
  pointer-events: auto;
}

/* Content container */
.popup-content {
  position: fixed;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  background: #2a2a2a;
  color: var(--text-primary, #ffffff);
  border-radius: 8px;
  padding: 40px;
  width: 90%;
  max-width: 800px;
  height: 90vh;
  max-height: 90vh;
  overflow-y: scroll !important;
  overflow-x: hidden;
  z-index: 999999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  box-sizing: border-box;
}

/* Dark theme scrollbar */
.popup-content::-webkit-scrollbar {
  width: 10px;
}

.popup-content::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 5px;
}

.popup-content::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 5px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

/* Light theme support */
.light-theme .popup-content {
  background: #ffffff;
  color: #333333;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Light theme scrollbar */
.light-theme .popup-content::-webkit-scrollbar {
  width: 10px;
}

.light-theme .popup-content::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 5px;
}

.light-theme .popup-content::-webkit-scrollbar-thumb {
  background: #999999;
  border-radius: 5px;
}

.light-theme .popup-content::-webkit-scrollbar-thumb:hover {
  background: #777777;
}

/* Close button */
.popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-primary, #ffffff);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.popup-close:hover {
  opacity: 0.7;
}

/* Popup header */
.popup-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.light-theme .popup-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.popup-header h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  margin: 0;
}

/* Popup content paragraphs */
.popup-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Spec sections */
.specs-section {

}

.specs-section:last-child {
  border-bottom: none;
}

.specs-section h3 {
  color: var(--primary-color, #00d4ff);
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.specs-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.specs-section li {
  padding-left: 20px;
  position: relative;
}

.specs-section li:before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-color, #00d4ff);
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
  .popup-content {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: auto;
    max-width: none;
    transform: none;
    margin: 0;
    padding: 30px 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }

  .popup-header h3 {
    font-size: 1.4rem;
  }

  .popup-content p {
    font-size: 1rem;
  }

  .specs-section h3 {
    font-size: 1.1rem;
  }
}