/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.instant_popup-front {

    display: none;
}
.instant_overlay {
    width: 100%;
    padding: 50px;
    left: 0;
    top: 0;
    z-index: 99;
    display: flex;
    position: fixed;
    /* width: 100%; */
    background: #000000ad;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.intant-popup-type-image i {
    color: black;
}

img#popup_image_front {
    border-radius: 10px;
    z-index: 10000;
    /* height: 80vh; */
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.intant-popup-type-image .inner_content {
    width: 100%;
    height: 100%;
}

.intant-popup-type-image.instant-popup-content {
    background:transparent !important;
    /* display: flex; */
    padding: 0;
    /* width and height controlled by JavaScript size settings */
}

.pointer_class {

    pointer-events: auto;
}
.pointer_class i {
    background: red;
    border-radius: 50px;
}

.ql-align-center {
    text-align: center;
}
.ql-align-right {
    text-align: right;
}
.ql-align-left {
    text-align: left;
}
.pointer_rc {
    pointer-events: none;

}

.instant-popup-content {
    scrollbar-width: none;
    top: 20px;
    position: relative;
    background: white;
    padding: 20px 25px;
    width: min(90%, 600px);
    max-width: 90vw;
    max-height: 90vh;
    /* margin: 0 auto; */
    border-radius: 10px;
}

/* HTML popup specific styling - transparent background by default */
.intant-popup-type-text.instant-popup-content {
    background: #fff;
    padding: 20px 25px;
    border-radius: 12px;
    min-width: 280px; /* sensible floor for small devices */
}

/* Enhanced specificity for custom styled text popups */
.intant-popup-type-text.instant-popup-content.ipb-text-custom-styled {
    /* Custom styling applied via JavaScript will override these defaults */
}

/* Redirect delay message (shown before redirecting to URL) */
.ipb-redirect-message {
    text-align: center;
    padding: 24px 20px;
}
.ipb-redirect-message p {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.5;
}
.ipb-redirect-message .ipb-redirect-url {
    margin: 0 0 16px;
    font-size: 14px;
    color: #666;
    word-break: break-all;
}
.ipb-redirect-message .ipb-redirect-countdown {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

/* ============================================
   Close Button - Unified Styling
   Maintains backward compatibility with extensions
   ============================================ */

.instant-cross {
    z-index: 99999;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    line-height: 1;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Accessibility: Focus styles for keyboard navigation */
.instant-cross:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-radius: 4px;
}

.instant-cross:focus:not(:focus-visible) {
    outline: none;
}

.instant-cross:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-radius: 4px;
}

.instant-cross i {
    font-size: 32px;
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.instant-cross:hover i {
    opacity: 0.8;
    transform: scale(1.05);
}

.instant-cross:active i {
    transform: scale(0.95);
}

/* Position variants - controlled via JavaScript data-close-position */
.instant-cross[data-position="top-left"],
.instant-cross.ipb-position-top-left {
    top: 15px;
    right: auto;
    left: 15px;
}

.instant-cross[data-position="bottom-right"],
.instant-cross.ipb-position-bottom-right {
    top: auto;
    bottom: 15px;
    right: 15px;
}

.instant-cross[data-position="bottom-left"],
.instant-cross.ipb-position-bottom-left {
    top: auto;
    bottom: 15px;
    right: auto;
    left: 15px;
}

/* Subscription popup close button styling - unified approach */
.intant-popup-type-subscription .instant-cross {
    z-index: 1001;
}

.intant-popup-type-subscription .instant-cross i {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.intant-popup-type-subscription .instant-cross:hover i {
    background: rgba(255, 255, 255, 1);
}

/* Image popup close button - ensure visibility on images */
.intant-popup-type-image .instant-cross i {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 5;
    }

    70% {
        opacity: 7;
    }

    100% {
        opacity: 1;
    }
}

@-moz-keyframes fadeIn {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 5;
    }

    70% {
        opacity: 7;
    }

    100% {
        opacity: 1;
    }
}

@-webkit-keyframes fadeIn {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 5;
    }

    70% {
        opacity: 7;
    }

    100% {
        opacity: 1;
    }
}

@-o-keyframes fadeIn {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 5;
    }

    70% {
        opacity: 7;
    }

    100% {
        opacity: 1;
    }
}

@-ms-keyframes fadeIn {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 5;
    }

    70% {
        opacity: 7;
    }

    100% {
        opacity: 1;
    }
}

@keyframes ipbZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@-webkit-keyframes ipbZoomIn {
    0% {
        opacity: 0;
        -webkit-transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        -webkit-transform: scale(1);
    }
}


/* Mobile responsive */

@media (max-width: 767px) {

    img#popup_image_front {
        /* height: 50vh; */
        border: none !important;
    }
    .instant_overlay {
         padding: 10px;
     }

    /* Better mobile popup sizing */
    .instant-popup-content {
        width: min(95%, 500px);
        max-width: 95vw;
        max-height: 85vh;
        padding: 15px 20px;
    }

    /* Mobile text popup specific styling */
    .intant-popup-type-text.instant-popup-content {
        padding: 15px 20px;
        border-radius: 10px;
    }
}

/* relative css */
/* Scale all common text elements inside */
.intant-popup-type-text {
  container-type: inline-size;
}

/* Headings */
.intant-popup-type-text h1 {
  font-size: clamp(1.5rem, 6cqw, 3em);
  margin: 0 0 0.5em 0;
  font-weight: bold;
}
.intant-popup-type-text h2 {
  font-size: clamp(1.3rem, 5cqw, 2.5em);
  margin: 0 0 0.5em 0;
  font-weight: bold;
}
.intant-popup-type-text h3 {
  font-size: clamp(1.1rem, 4cqw, 2em);
  margin: 0 0 0.5em 0;
  font-weight: bold;
}
.intant-popup-type-text h4 {
  font-size: clamp(1rem, 3cqw, 1.8em);
  margin: 0 0 0.5em 0;
  font-weight: bold;
}
.intant-popup-type-text h5 {
  font-size: clamp(0.9rem, 2.5cqw, 1.5em);
  margin: 0 0 0.5em 0;
  font-weight: bold;
}
.intant-popup-type-text h6 {
  font-size: clamp(0.8rem, 2cqw, 1.3em);
  margin: 0 0 0.5em 0;
  font-weight: bold;
}

/* Text-based elements */
.intant-popup-type-text p,
.intant-popup-type-text span,
.intant-popup-type-text a,
.intant-popup-type-text ul,
.intant-popup-type-text ol,
.intant-popup-type-text li,
.intant-popup-type-text label {
  font-size: clamp(0.75rem, 1.9cqw, 1.2em);
  line-height: 1.5;
  margin: 0 0 1em 0;
}

/* Paragraph spacing */
.intant-popup-type-text p {
  margin-bottom: 1em;
}

.intant-popup-type-text p:last-child {
  margin-bottom: 0;
}

/* Line breaks */
.intant-popup-type-text br {
  display: block;
  margin: 0.5em 0;
  content: "";
}

/* Table elements */
.intant-popup-type-text table,
.intant-popup-type-text th,
.intant-popup-type-text td {
  font-size: clamp(0.8rem, 1.8cqw, 1.3em);
}

/* Forms & buttons */
.intant-popup-type-text input,
.intant-popup-type-text select,
.intant-popup-type-text textarea,
.intant-popup-type-text button {
  font-size: clamp(0.8rem, 1.8cqw, 1.3em);
}

/* Code/Pre elements */
.intant-popup-type-text code,
.intant-popup-type-text pre {
  font-size: clamp(0.7rem, 1.6cqw, 1.1em);
  font-family: monospace;
}

/* Blockquote */
.intant-popup-type-text blockquote {
  font-size: clamp(0.9rem, 2cqw, 1.4em);
  font-style: italic;
}

/* Small text */
.intant-popup-type-text small {
  font-size: clamp(0.6rem, 1cqw, 0.9em);
}

/* Inline emphasis */
.intant-popup-type-text b,
.intant-popup-type-text strong {
  font-size: clamp(0.8rem, 1.6cqw, 1.2em);
  font-weight: bold;
}

.intant-popup-type-text em {
  font-size: clamp(0.8rem, 1.6cqw, 1.2em);
  font-style: italic;
}
