@import "constants.css";

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Fundo escurecido */
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: 15% auto;
    border: 2px solid rgb(0, 0, 0);
    border-radius: 8px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 80%;
    max-height: 80%;
    overflow: hidden;
}

.modal-content img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.carousel-images-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
    width: 100%;
    overflow: hidden;
    background-color: transparent; /* Fundo transparente */
}

/*.carousel-images-modal img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    border: none; /* Remove bordas */
/*}*/

/* Estilos para imagens do carrossel */
.carousel-images-modal img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    border: none; /* Remove bordas */
    max-height: 800px; /* Define uma altura máxima para a imagem */
    min-height: 800px;
    max-width: 800px;
    min-width: 800px;
    object-fit: cover; /* Garante que a imagem se ajuste ao tamanho sem distorcer */
    border-radius: 8px;
}

.modal .prev,
.modal .next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent; /* Fundo transparente nos botões */
    border: none;
    cursor: pointer;
    outline: none;
    padding: 10px;
    border-radius: 50%; /* Deixa os botões circulares */
    transition: background-color 0.3s ease; /* Transição suave */
}

/* Ajuste de posicionamento dos botões */
.modal .prev {
    left: 5%; /* Ajuste em relação à largura da tela */
}

.modal .next {
    right: 5%; /* Ajuste em relação à largura da tela */
}

/* Ajusta o tamanho dos ícones dos botões */
.modal .prev img,
.modal .next img {
    width: 40px; /* Ajuste o tamanho do ícone */
    height: 40px;
}

/* Efeito de hover nos botões */
.modal .prev:hover,
.modal .next:hover {
    background-color: transparent; /* Mantém o fundo transparente ao passar o mouse */
}

.modal .prev img:hover,
.modal .next img:hover {
    transform: scale(1.1); /* Leve aumento no tamanho ao passar o mouse */
}

.close {
    float: right;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--laranja);
    text-decoration: none;
    cursor: pointer;
}

/* Estilos responsivos */
@media (max-width: 1200px) {
    .modal-content {
        max-width: 90%; /* Aumenta a largura em telas médias */
        margin: 10% auto; /* Ajusta a margem */
    }

    .carousel-images-modal img {
        max-height: 600px; /* Ajusta a altura máxima em telas médias */
        min-height: 300px; /* Ajusta a altura mínima */
    }
}

@media (max-width: 900px) {
    .modal-content {
        max-width: 95%; /* Aumenta a largura em telas menores */
        margin: 5% auto; /* Ajusta a margem */
    }

    .carousel-images-modal img {
        max-height: 500px; /* Ajusta a altura máxima em telas menores */
        min-height: 250px; /* Ajusta a altura mínima */
    }

    .modal .prev,
    .modal .next {
        padding: 5px; /* Reduz o padding dos botões */
    }

    .modal .prev img,
    .modal .next img {
        width: 30px; /* Ajusta o tamanho do ícone */
        height: 30px;
    }
}

@media (max-width: 600px) {
    .modal-content {
        max-width: 100%; /* Largura total em telas pequenas */
        margin: 0; /* Sem margem */
    }

    .carousel-images-modal img {
        max-height: 400px; /* Ajusta a altura máxima em telas pequenas */
        min-height: 200px; /* Ajusta a altura mínima */
    }

    .close {
        font-size: 30px; /* Reduz o tamanho do botão de fechar */
    }
}