/* EasyColor Tools | easycolor-tools | Estilos públicos e dimensionamento responsivo dos pop-ups. */
.easycolor-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    pointer-events: none;
}

.easycolor-popup[data-easycolor-popup-state="visible"] {
    display: block;
    pointer-events: auto;
}

.easycolor-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
}

.easycolor-popup[data-overlay="0"] .easycolor-popup-overlay {
    display: none;
}

.easycolor-popup-dialog {
    position: absolute;
    width: min(var(--easycolor-popup-width, 640px), calc(100vw - 32px));
    max-height: min(88vh, 760px);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 28px;
    border-radius: var(--easycolor-popup-radius, 14px);
    background: #fff;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.24);
}

.easycolor-popup-title {
    margin: 0 36px 16px 0;
    font-size: 24px;
    line-height: 1.25;
}

.easycolor-popup-content > :first-child {
    margin-top: 0;
}

.easycolor-popup-content > :last-child {
    margin-bottom: 0;
}

/* Conteúdo independente de larguras inline definidas no editor ou no tema. */
.easycolor-popup-content {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.easycolor-popup-content img,
.easycolor-popup-content video,
.easycolor-popup-content iframe,
.easycolor-popup-content embed,
.easycolor-popup-content object,
.easycolor-popup-content svg {
    max-width: 100% !important;
    height: auto;
    box-sizing: border-box;
}

.easycolor-popup-content iframe {
    display: block;
    aspect-ratio: 16 / 9;
    width: 100%;
    max-height: 70vh;
}

.easycolor-popup-content figure,
.easycolor-popup-content .wp-caption,
.easycolor-popup-content .wp-block-image,
.easycolor-popup-content .wp-block-embed,
.easycolor-popup-content table {
    max-width: 100% !important;
    box-sizing: border-box;
}

.easycolor-popup-content .wp-caption img,
.easycolor-popup-content figure img {
    display: block;
}

.easycolor-popup-close {
    position: sticky;
    top: 0;
    float: right;
    width: 34px;
    height: 34px;
    margin: -10px -10px 10px 10px;
    border: 0;
    border-radius: 999px;
    background: #f0f0f1;
    color: #1d2327;
    font-size: 26px;
    line-height: 30px;
    cursor: pointer;
}

.easycolor-popup-position-center .easycolor-popup-dialog {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.easycolor-popup-position-top .easycolor-popup-dialog {
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
}

.easycolor-popup-position-bottom .easycolor-popup-dialog {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
}

.easycolor-popup-position-bottom_right .easycolor-popup-dialog {
    right: 24px;
    bottom: 24px;
    width: min(var(--easycolor-popup-width, 420px), calc(100vw - 32px));
}

.easycolor-popup-position-bottom_left .easycolor-popup-dialog {
    bottom: 24px;
    left: 24px;
    width: min(var(--easycolor-popup-width, 420px), calc(100vw - 32px));
}

.easycolor-popup-position-fullscreen .easycolor-popup-dialog {
    inset: 24px;
    width: auto;
    max-height: calc(100vh - 48px);
}

body.easycolor-popup-scroll-locked {
    overflow: hidden;
}

@media (max-width: 640px) {
    .easycolor-popup-dialog,
    .easycolor-popup-position-bottom_right .easycolor-popup-dialog,
    .easycolor-popup-position-bottom_left .easycolor-popup-dialog {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - 24px);
        transform: none;
        padding: 22px;
    }

    .easycolor-popup-position-center .easycolor-popup-dialog {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }
}

.easycolor-popup-cta,
.easycolor-popup-content a.easycolor-popup-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--easycolor-popup-accent, #0f66ff);
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.easycolor-popup-cta:hover,
.easycolor-popup-content a.easycolor-popup-cta:hover {
    color: #fff;
    filter: brightness(0.94);
}

/* POP-08: apresentação de peça visual isolada, sem título ou moldura branca. */
.easycolor-popup-image-only .easycolor-popup-dialog {
    padding: 0;
    background: transparent;
    overflow: visible;
    max-height: min(88vh, 760px);
}
.easycolor-popup-image-only .easycolor-popup-content,
.easycolor-popup-image-only .easycolor-popup-content p,
.easycolor-popup-image-only .easycolor-popup-content figure {
    margin: 0;
    padding: 0;
    line-height: 0;
}
.easycolor-popup-image-only .easycolor-popup-content img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(88vh, 760px);
    object-fit: contain;
    border-radius: var(--easycolor-popup-radius, 14px);
}
.easycolor-popup-image-only .easycolor-popup-close {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    float: none;
    margin: 0;
    width: 32px;
    height: 32px;
    color: #fff;
    background: rgba(0, 0, 0, .68);
    border: 1px solid rgba(255,255,255,.6);
    line-height: 28px;
}
.easycolor-popup-image-only .easycolor-popup-close:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}
@media (max-width: 640px) {
    .easycolor-popup-image-only .easycolor-popup-dialog { padding: 0; }
    .easycolor-popup-image-only .easycolor-popup-content img { max-height: calc(100vh - 24px); }
}
