/**
 * Styling voor click-based modal popups
 * Schakelt GF hover tooltips EN PowerTip uit
 */

/* Schakkel PowerTip tooltip volledig uit */
#powerTip {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Modal Overlay */
.gftt-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Schakkel alle hover tooltips van Gravity Forms uit */
.gftt-icon {
  pointer-events: auto !important;
}

.gftt-icon:hover ~ .gftt-content {
  display: none !important;
  visibility: hidden !important;
}

/* Tooltip wrapper styling - standaard verborgen */
.gftt-content {
  visibility: hidden !important;
  display: none !important;
  opacity: 0;
  z-index: 10000 !important;
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  word-wrap: break-word;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  right: auto !important;
  bottom: auto !important;
  border: none;
}

/* Modal specifieke styling */
.gftt-content.gftt-modal {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translate(-50%, -48%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* Zichtbaar wanneer popup actief is */
.gftt-content.gftt-popup-visible {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  z-index: 10001 !important;
  pointer-events: auto !important;
  width: 95% !important;
  height: 60vh;
  overflow: scroll;
}

/* Schakkel GF's eigen show class uit */
.gftt-content.show {
  display: none !important;
  visibility: hidden !important;
}

.gform-theme__tooltip--show {
  display: none !important;
  visibility: hidden !important;
}

/* Close button styling */
.gftt-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10002;
}

.gftt-modal-close:hover {
  color: #333;
  background: #f0f0f0;
  transform: scale(1.1);
}

.gftt-modal-close:active {
  transform: scale(0.95);
}

/* Tooltip content text */
.gftt-content [id$="-content"] {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  margin: 0;
  padding: 0;
  padding-top: 10px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Info icon styling */
.gftt-icon {
  display: inline-block;
  cursor: pointer;
  padding: 2px 6px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border-radius: 3px;
  background: none !important;
  border: none !important;
}

.gftt-icon:hover {
  opacity: 0.7;
  transform: scale(1.15);
}

.gftt-icon:active {
  transform: scale(0.95);
}

/* Accessibility: Focus state */
.gftt-icon:focus {
  outline: 2px solid #4A90E2 !important;
  outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 640px) {
  .gftt-content {
    max-width: 90%;
    padding: 20px;
  }
  
  .gftt-modal-close {
    top: 10px;
    right: 10px;
    font-size: 28px;
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 1024px) {
  .gftt-content.gftt-popup-visible{
    height: unset;
    overflow: unset;
  }
}