/* Dan Custom Popups Styles */
.dcp-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.dcp-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.dcp-popup-content {
  position: relative; /* Indispensabile per posizionare la X in modo assoluto */
  background: #fff;
  width: 90%;
  max-width: 600px;
  margin: 20px auto;
  border-radius: 8px;
  display: flex; /* Usiamo flexbox per gestire l'altezza */
  flex-direction: column;
  max-height: 70vh; /* Impedisce al popup di essere più alto dello schermo */
  overflow: hidden;
}

.dcp-popup-overlay.active .dcp-popup-content {
  transform: scale(1);
}

.dcp-popup-close {
  position: absolute; /* Rimane fisso rispetto a .dcp-popup-content */
  top: 15px;
  right: 15px;
  z-index: 1000; /* Sempre sopra tutto */
  border: none;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  padding: 10px;
  margin: 0;
  background: none;
}
.dcp-popup-close *{
 
  line-height: 0;

}
.dcp-popup-close:hover {
  transform: scale(1.1);
  background: none;
}

.dcp-popup-inner-content {
  padding: 60px 30px 30px; /* Padding superiore generoso per non finire "sotto" la X */
  overflow-y: auto; /* Solo questa parte deve avere lo scroll */
  flex-grow: 1; /* Prende tutto lo spazio disponibile nel box */
}

/* Specific styles for warning/error popups */
.dcp-popup-content.dcp-popup-warning {
  border-top: 6px solid #f0ad4e; /* Orange for warnings */
}
.dcp-popup-content.dcp-popup-error {
  border-top: 6px solid #d32f2f; /* Red for errors */
}

/* Basic styling for dynamic action buttons within popups */
.dcp-dynamic-action-button {
  background-color: #0073aa;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 15px;
  font-size: 1em;
}

.dcp-dynamic-action-button:hover {
  background-color: #005177;
}

/* Prevent body scroll when popup is open */
body.dcp-popup-open {
  overflow: hidden;
}
