/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

/* Modal container */
.modal-like {
    width: 688px;
    max-width: 90%;
    height: 632px;
    max-height: 90vh;
    background: #FFFFFF;
    border: 2px solid #CCDAE6;
    border-radius: 16px;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;

    /* Remove barra de rolagem */
    overflow: hidden;
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Circular', system-ui, sans-serif;
    font-size: 22px;
    line-height: 24px;
    font-weight: 700;
    color: #283E80;
    margin: 0;
}

/* Botão fechar */
.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 22px;
    font-weight: 900;
    color: #C1C72F;
    cursor: pointer;
}

/* Conteúdo */
.modal-content {
    text-align: center;
    flex-shrink: 0;
}

.modal-content img {
    width: 640px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 24px 0 12px;
}

.modal-content p {
    width: 600px;
    max-width: 100%;
    margin: 0 auto;
    font: normal normal normal 16px/22px Circular;
    color: #283E80;
}

/* Footer */
.modal-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-next {
    width: 624px;
    max-width: 100%;
    height: 64px;
    background: #C1C72F;
    border-radius: 32px;
    border: none;
    font: normal normal normal 16px/18px Circular;
    color: #F8FAFB;
    cursor: pointer;
}

.btn-prev {
    margin-top: 20px;
    background: none;
    border: none;
    font: normal normal 900 12px/15px Circular;
    color: #CDD239;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-prev:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Links dentro do modal */
.modal-like a {
    color: #C1C72F;
    font-weight: 900;
    text-decoration: none;
}

.modal-like a:hover {
    text-decoration: underline;
}


@media (max-width: 767px) {

    .modal-like {
        width: calc(100% - 32px);   /* margem lateral maior */
        height: calc(100vh - 32px); /* margem superior e inferior */
        max-width: 100%;
        max-height: 100%;
        padding: 16px;              /* padding interno maior */
        border-radius: 12px;

        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;

        overflow: hidden;
        box-sizing: border-box;
    }

    .modal-header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 8px;
        box-sizing: border-box;
    }

    .modal-header h2 {
        font-size: 16px;
        line-height: 20px;
        margin: 0;
        flex: 1;
        text-align: center;
        word-break: break-word;
    }

    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 20px;
        color: #C1C72F;
        background: none;
        border: none;
        cursor: pointer;
        flex-shrink: 0;
    }

    .modal-content {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        flex: 1;
        overflow: hidden;
        padding: 0 12px; /* padding interno lateral para o conteúdo */
        box-sizing: border-box;
    }

    .modal-content img {
        width: 100%;
        max-width: 75%;   /* imagem menor para caber texto */
        height: auto;
        max-height: 22vh; /* menor ainda para dar espaço */
        object-fit: contain;
        margin: 8px 0;
    }

    .modal-content p {
        font-size: 13px;
        line-height: 18px;
        padding: 0 12px; /* mais espaço lateral para o texto */
        text-align: center;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .modal-footer {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding-top: 4px;
    }

    .btn-next {
        width: 100%;
        height: 48px;
        font-size: 13px;
        border-radius: 24px;
    }

    .btn-prev {
        font-size: 11px;
        margin-top: 0;
    }

    .modal-indicators {
        margin: 8px 0;
        gap: 6px;
    }

    .indicator {
        width: 20px;
        height: 3px;
    }

    .modal-text-wrapper {
        width: 100%;
        padding: 0 12px; /* padding lateral maior */
        box-sizing: border-box;
    }

    #modalText {
        max-width: 50%;
    }
}
