/* modal.css
   Estilos para o modal de eventos - overlay escuro + modal centralizado
   Compatível com IE9+
*/

/* Overlay escuro de fundo */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 100;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: block;
    opacity: 1;
}

/* Modal container (centralizado) */
.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 714px;
    height: 472px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 101;
    display: none;
    overflow: visible;
    opacity: 0;
    -webkit-transition: opacity 0.3s ease, -webkit-transform 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
    -webkit-transform: translate(-50%, -50%) scale(0.9);
    transform: translate(-50%, -50%) scale(0.9);
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 16px;
}

.modal-container.active {
    display: block;
    opacity: 1;
    -webkit-transform: translate(-50%, -50%) scale(1);
    transform: translate(-50%, -50%) scale(1);
}

/* Header do modal com poster */
.modal-header {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: block;
    box-sizing: border-box;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
    flex-shrink: 0;
}

/* Conteúdo do modal (título, descrição, QR code) */
.modal-content {
    padding: 30px;
    display: block;
    text-align: left;
    overflow: hidden;
    max-height: calc(85vh - 320px);
    font-size: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Layout para título + QR code lado a lado */
.modal-body {
    display: inline-block;
    width: calc(100% - 200px - 60px);
    vertical-align: top;
    margin-right: 0;
    padding-right: 0;
    font-size: 16px;
}

.modal-qr {
    display: inline-block;
    width: 170px;
    height: 170px;
    vertical-align: top;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    font-size: 16px;
}

.modal-qr img {
    width: 100%;
    height: 100%;
    /* IE9: object-fit não suportado, usar max-width/max-height para manter proporção */
    max-width: 100%;
    max-height: 100%;
}

.modal-qr-label {
    font-family: Inter, Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #000000;
    margin: 15px 0 0 0;
}

/* Título do evento */
.modal-title {
    font-family: Inter, Arial, sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #000000;
    margin: 0 0 20px 0;
}

/* Descrição */
.modal-description {
    font-family: Inter, Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    color:#000000;
    margin: 0 0 10px 0;
}

/* Footer do modal com CTA */
.modal-footer {
    padding: 20px 30px 30px 30px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    position: relative;
}

.modal-footer-content {
    position: relative;
    display: block;
    text-align: center;
}

.modal-cta {
    display: inline-block;
    background: #C11C36;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 12px 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0;
    -webkit-transition: background 0.2s ease;
    transition: background 0.2s ease;
}

.modal-cta:hover,
.modal-cta:focus {
    background: #a01729;
    outline: none;
}

.modal-close-wrapper {
    position: absolute;
    bottom: -90px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 102;
    text-align: center;
}

.modal-close-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    display: block;
    text-align: center;
    line-height: 40px;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
    -webkit-transition: background 0.2s ease;
    transition: background 0.2s ease;
}

.modal-close-label {
    display: block;
    color: #ffffff;
    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    margin-top: 8px;
    text-align: center;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    background: rgba(193, 28, 54, 1);
    outline: none;
}

body.modal-close-btn-selected .modal-close-btn {
    /* Sem cor de vermelho quando selecionado */
    box-shadow: none;
    -webkit-box-shadow: none;
}

/* Tablet/Monitor (1367px a 1920px) */
@media (min-width: 1367px) and (max-width: 1919px) {
    .modal-container {
        width: 85%;
        max-width: 950px;
        height: auto;
    }

    .modal-header {
        height: 300px;
        background-size: 100% 100%;
        background-position: center;
        flex-shrink: 0;
    }

    .modal-content {
        padding: 35px;
    }

    .modal-footer {
        padding: 22px 35px 35px 35px;
    }

    .modal-close-wrapper {
        bottom: -100px;
    }

    .modal-close-btn {
        width: 50px;
        height: 50px;
        font-size: 30px;
        line-height: 50px;
    }

    .modal-close-label {
        font-size: 16px;
        margin-top: 10px;
    }

    .modal-cta {
        padding: 13px 42px;
        font-size: 14px;
    }

    .modal-body {
        width: calc(100% - 220px - 35px);
        margin-right: 35px;
    }

    .modal-title {
        font-size: 28px;
        margin-bottom: 22px;
    }

    .modal-description {
        font-size: 15px;
    }

    .modal-qr {
        width: 220px;
        height: 220px;
        border-radius: 12px;
        padding: 15px;
    }

    .modal-qr-label {
        font-size: 14px;
        margin: 18px 0 0 0;
    }
}

/* TV (acima de 1920px) */
@media (min-width: 1920px) {
    .modal-container {
        width: 88%;
        max-width: 1050px;
        height: auto;
    }

    .modal-header {
        height: 350px;
        background-size: 100% 100%;
        background-position: center;
        flex-shrink: 0;
    }

    .modal-content {
        padding: 42px;
    }

    .modal-body {
        width: calc(100% - 260px - 42px);
        margin-right: 42px;
    }

    .modal-title {
        font-size: 32px;
        margin-bottom: 26px;
    }

    .modal-description {
        font-size: 16px;
        line-height: 1.6;
    }

    .modal-qr {
        width: 260px;
        height: 260px;
        border-radius: 13px;
        padding: 16px;
    }

    .modal-qr-label {
        font-size: 15px;
        margin: 20px 0 0 0;
    }

    .modal-footer {
        padding: 28px 42px 42px 42px;
    }

    .modal-close-wrapper {
        bottom: -105px;
    }

    .modal-close-btn {
        width: 52px;
        height: 52px;
        font-size: 32px;
        line-height: 52px;
    }

    .modal-close-label {
        font-size: 17px;
        margin-top: 11px;
    }

    .modal-cta {
        padding: 13px 43px;
        font-size: 15px;
    }
}
