/*--------------------------------------------------------------------------
   MODAL
   --------------------------------------------------------------------------*/
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    z-index: 1000;
}

#modal-overlay.open {
    visibility: visible;
    opacity: 1;
}

#modal-background {
    background-color: rgba(22, 33, 62, 0.8);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#modal-conteiner {
    position: relative;
    background-color: var(--cor-card-bg);
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}


.close-modal-button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--cor-texto-secundario);
    cursor: pointer;
    line-height: 1;
}
.close-modal-button:hover {
    color: var(--cor-header);
}

#modal-body {
    display: flex;
    gap: 2rem;
    text-align: left;
}

#movie-poster {
    width: 250px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

#movie-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#movie-title {
    font-size: 2.2rem;
    color: var(--cor-header);
    margin-bottom: 0;
    padding-right: 2rem; 
}

#movie-year {
    font-size: 1.2rem;
    color: var(--cor-texto-secundario);
    margin-top: -0.5rem;
    font-weight: 500;
}

#movie-plot h3, #movie-cast h4, #movie-genre h5 {
    line-height: 1.6;
    font-weight: 400;
}

#movie-cast h5, #movie-genre h4 {
    font-weight: 700;
    color: var(--cor-header);
    margin-bottom: 0.25rem;
}

#modal-footer {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    width: 100%;
}

#add-to-list {
    border: 2px solid var(--cor-header);
    padding: 1rem 0;
    flex-grow: 1;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    background-color: var(--cor-header);
    color: var(--cor-card-bg);
}

#add-to-list:hover {
    background-color: #2a3f6d; 
    border-color: #2a3f6d;
}



@media (max-width: 768px) {
    #modal-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    #movie-info {
        text-align: left;
    }
    #movie-poster {
        width: 100%;
        max-width: 250px;
    }
    #modal-conteiner {
        padding: 1.5rem;
    }
    #movie-title {
        font-size: 1.8rem;
    }
    #modal-footer {
        flex-direction: column;
    }
}