@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;600&display=swap');

.modalContainer {
    display: none;
    /*background-color: rgba(190, 190, 190, 0.835);*/
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
}

.modal {
    color: white;
    padding: 20px 30px 5px 30px;
    border-radius: 20px;
    max-width: 700px;
    height: auto;
    max-height: 90vh;
    overflow: hidden;
    margin: auto;
    background-color: rgb(5, 5, 5);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modalHeadingContainer {
    display: flex;
    align-items: flex-end;
    margin-top: 10px;
}

.modalElementSymbol {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    width: 75px;
    height: 60px;
    padding-top: 5px;
    border: 5px solid white;
    border-radius: 10px;
    border-bottom-right-radius: 0;
    font-family: 'Comfortaa', cursive, 'Courier New', Courier, monospace;
}

.modalHeading {
    width: 75%;
    font-size: 1.2rem;
    letter-spacing: 1px;
    padding-bottom: 10px;
    padding-left: 30px;
    border-bottom: 5px solid white;
    transform: translateX(-15px);
    font-family: 'Comfortaa', cursive, 'Courier New', Courier, monospace;
}

.infoSection {
    margin-top: 20px;
    margin-bottom: 20px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 5px;
    word-spacing: 2px;
    scrollbar-width: thin;
}

.infoSection::-webkit-scrollbar {
    width: 8px;
}

.infoSection::-webkit-scrollbar-track {
    background-color: rgb(235, 235, 235);
}

.infoSection::-webkit-scrollbar-thumb {
    background-color: rgb(150, 150, 150);
    border-radius: 5px;
    transition: .2s;
}

.infoSection::-webkit-scrollbar-thumb:hover {
    background-color: rgb(120, 120, 120);
}

.modalLabel {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.modalInfo {
    color: rgb(190, 190, 190);
    font-size: 1.1rem;
    font-weight: 100;
    margin-left: 10px;
}

.elementFacts,
.elementHistory {
    margin-top: 5px;
    padding-right: 10px;
}

.modalButtonContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 10px;
}

.modalButton {
    font-family: 'Comfortaa', cursive;
    font-weight: 600;
    width: 180px;
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    background-color: white;
    transition: .2s;
    text-align: center;
}

.modalButton:hover {
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.9);
}

.modalButton:active {
    background-color: rgb(225, 225, 225);
}

.closeButton {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgb(254, 39, 20);
    border: none;
    color: #fff;
    font-size: 18px;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
    transition: .2s;
}

.closeButton:hover {
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.9);
}

.closeButton:active {
    background-color: rgb(237, 35, 17);
    box-shadow: 0 0 5px rgba(115, 115, 115, 0.9);
}

/* Responsive para móvil */
@media (max-width: 767px) {
    .modal {
        width: 90%;
        height: auto;
        max-height: 85vh;
        padding: 20px;
    }

    .infoSection {
        max-height: 45vh;
    }

    .modalHeading {
        font-size: 1rem;
        padding-left: 20px;
    }

    .modalElementSymbol {
        width: 60px;
        height: 50px;
        font-size: 2.2rem;
    }

    .modalInfo {
        font-size: 0.95rem;
    }

    .modalButton {
        width: 160px;
        font-size: 0.9rem;
    }

    .modalButtonContainer {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .closeButton {
        top: 20px;
        right: 20px;
    }
}
