/**
 * 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: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    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: 0;
    position: relative;
    background: white;
    padding: 20px 25px;
    width: min(90%, 600px);
    max-width: 90vw;
    max-height: 90vh;
    /* margin: 0 auto; */
    border-radius: 16px;
    box-sizing: border-box;
}

/* Modern, content-driven text popup surface */
.intant-popup-type-text.instant-popup-content {
    background: #fff;
    padding: 28px 32px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    min-width: 280px;
    height: auto;
    overflow: hidden;
    color: #1e293b;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: -0.008em;
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.28),
        0 4px 16px rgba(15, 23, 42, 0.12);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.intant-popup-type-text .inner_content {
    width: 100%;
    max-height: inherit;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    box-sizing: border-box;
}

.intant-popup-type-text.ipb-close-at-right .inner_content {
    padding-right: 34px;
}

.intant-popup-type-text.ipb-close-at-left .inner_content {
    padding-left: 34px;
}

.intant-popup-type-text .inner_content::-webkit-scrollbar {
    width: 6px;
}

.intant-popup-type-text .inner_content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

/* 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: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0;
    margin: 0;
    line-height: 1;
    color: #475569;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    -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: 18px;
    display: block;
    color: inherit;
    transition: transform 0.18s ease;
}

.instant-cross:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
}

.instant-cross:hover i {
    transform: rotate(3deg);
}

.instant-cross:active {
    transform: translateY(0) scale(0.96);
}

/* 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;
    color: #333333;
    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: 22px 20px;
        border-radius: 16px;
        width: min(94%, 500px);
    }

    .intant-popup-type-text.ipb-close-at-right .inner_content {
        padding-right: 28px;
    }

    .intant-popup-type-text.ipb-close-at-left .inner_content {
        padding-left: 28px;
    }
}

/* 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.75em, 6cqw, 2.5em);
  line-height: 1.12;
  margin: 0 0 0.55em;
  font-weight: 750;
  letter-spacing: -0.035em;
}
.intant-popup-type-text h2 {
  font-size: clamp(1.45em, 5cqw, 2em);
  line-height: 1.18;
  margin: 0 0 0.55em;
  font-weight: 720;
  letter-spacing: -0.028em;
}
.intant-popup-type-text h3 {
  font-size: clamp(1.2em, 4cqw, 1.55em);
  line-height: 1.25;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.018em;
}
.intant-popup-type-text h4 {
  font-size: 1.1em;
  line-height: 1.3;
  margin: 0 0 0.45em;
  font-weight: 700;
}
.intant-popup-type-text h5 {
  font-size: 1em;
  line-height: 1.35;
  margin: 0 0 0.4em;
  font-weight: 700;
}
.intant-popup-type-text h6 {
  font-size: 0.9em;
  line-height: 1.4;
  margin: 0 0 0.4em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Rich text inherits the editor's formatting instead of overriding every span. */
.intant-popup-type-text p,
.intant-popup-type-text ul,
.intant-popup-type-text ol,
.intant-popup-type-text blockquote,
.intant-popup-type-text pre {
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 0.9em;
}

.intant-popup-type-text span,
.intant-popup-type-text a,
.intant-popup-type-text strong,
.intant-popup-type-text em,
.intant-popup-type-text u,
.intant-popup-type-text s,
.intant-popup-type-text label {
  font-size: inherit;
  line-height: inherit;
}

.intant-popup-type-text a {
  color: #2563eb;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.intant-popup-type-text ul,
.intant-popup-type-text ol {
  padding-left: 1.35em;
}

.intant-popup-type-text li {
  font-size: inherit;
  line-height: inherit;
  margin: 0.3em 0;
}

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

.intant-popup-type-text blockquote {
  padding: 0.75em 1em;
  border-left: 3px solid #3b82f6;
  background: #f8fafc;
  border-radius: 0 10px 10px 0;
  color: #475569;
}

/* 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;
}
