/**
 * Info Tooltip Modal Styles
 */

/* Modal backdrop and container */
.info-modal {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  z-index: var(--z-banner);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.info-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.info-modal__backdrop {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background: rgba(15, 23, 22, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Modal content box */
.info-modal__content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 360px;
  max-height: calc(100vh - 64px);
  width: calc(100% - 32px);
  margin: 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(20px) scale(0.95);
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.info-modal.is-open .info-modal__content {
  transform: translateY(0) scale(1);
}

/* Close button */
.info-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(15, 23, 22, 0.05);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, color 150ms ease;
}

.info-modal__close:hover {
  background: rgba(15, 23, 22, 0.1);
  color: #1f2937;
}

.info-modal__close:focus {
  outline: none;
  box-shadow: 0 0 0 2px #00d4a4;
}

/* Title */
.info-modal__title {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f1716;
  padding-right: 32px;
}

/* Text */
.info-modal__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
}

/* Make info icons more obviously clickable */
.infoIcon,
.tileInfo {
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease, background 150ms ease;
}

.infoIcon:hover,
.tileInfo:hover {
  opacity: 1 !important;
  transform: scale(1.15);
  background: rgba(0, 212, 164, 0.1);
}

.infoIcon:active,
.tileInfo:active {
  transform: scale(0.95);
}

/* Ensure clicks work on info icons inside labels */
.radioRow .infoIcon,
.tile .tileInfo {
  position: relative;
  z-index: var(--z-base);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .info-modal__content {
    padding: 20px;
    max-width: 100%;
    margin: 12px;
    border-radius: 12px;
  }

  .info-modal__title {
    font-size: 16px;
  }

  .info-modal__text {
    font-size: 13px;
  }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
  /* Keep light modal for readability */
}
