/*--Main enchantment helper box--*/

/*--Main Page--*/

.enchantment-helper-page {
    width: min(100% - 32px, 1000px);
    margin: 0 auto;
    padding: 40px 0 60px;
}

@media (max-width: 650px) {
    .enchantment-helper-page {
        width: min(100% - 20px, 1000px);
        padding-top: 28px;
    }
}

.prompt {
    max-width: 1000px;
    margin: 40px auto 24px auto;
    padding: 16px;

    background-color: rgba(30, 30, 30, 0.75);

    border: 1px solid rgba(120, 51, 174, 0.45);
    border-radius: 12px;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25);
}

/*Used for both the search bar label and book calculator labels*/
.prompt label {
    display: block;

    margin-bottom: 8px;

    font-size: 15px;
    font-weight: bold;

    color: #e6d9f5;

    text-shadow:
        0 0 6px rgba(120, 51, 174, 0.4);
}


/*--Shared input and dropdown styles--*/

/*Used for both the search bar and book calculator dropdowns*/
.prompt select,
input {
    box-sizing: border-box;
    width: 100%;

    padding: 12px;

    background-color: #363636;
    color: white;

    border: 1px solid #6f6f6f;
    border-radius: 8px 8px 0 0;

    font-size: 16px;

    cursor: pointer;
}

.prompt select:focus,
input:focus {
    outline: none;

    border-color: #c79cff;

    box-shadow:
        0 0 5px rgba(120, 51, 174, 0.8),
        0 0 10px rgba(120, 51, 174, 0.35);
}


/*--Enchantment search bar--*/

.searchable-select {
    position: relative;
}


/*--Enchantment search options--*/

#enchantment-search-options {
    position: absolute;
    z-index: 10;

    top: 100%;
    left: 0;

    width: 100%;
    max-height: 300px;

    overflow-y: auto;

    background-color: #363636;

    border: 1px solid #6f6f6f;
    border-radius: 0 0 8px 8px;

    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.4),
        0 0 8px rgba(120, 51, 174, 0.25);
}

.search-option {
    padding: 8px;

    background-color: #363636;

    border-bottom: 1px solid rgba(97, 97, 97, 0.7);

    cursor: pointer;

    transition: 0.13s;
}

/*Used for both mouse and keyboard selection*/
.search-option:hover,
.search-option.selected {
    background-color: #7833ae;
    transform: translateY(-3px);
}


/*--Search option scrollbar--*/

#enchantment-search-options::-webkit-scrollbar {
    width: 10px;
}

#enchantment-search-options::-webkit-scrollbar-track {
    background-color: #4e4e4e;

    border-radius: 0 0 8px 8px;
}

#enchantment-search-options::-webkit-scrollbar-thumb {
    background-color: #7833ae;

    border: 1px solid black;
    border-radius: 8px;
    padding: 8px;
}

#enchantment-search-options::-webkit-scrollbar-thumb:hover {
    background-color: #9b6bc2;
}


/*--Enchantment information book--*/

.enchantment-info {
    margin-top: 24px;
    padding: 24px;

    background-color: #5A3825;

    border: 2px solid #7A4E2D;
    border-radius: 16px;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.35),
        inset 0 0 20px rgba(0, 0, 0, 0.15);
}


/*--Basic enchantment information--*/

#enchantment-name {
    width: 100%;

    margin-top: 0;
    margin-bottom: 8px;
    padding: 10px 0;

    text-align: center;
    font-size: 32px;
    text-shadow: 0 0 8px rgba(249, 249, 250, 0.2);

    color: white;
    background-color: rgba(207, 21, 84, 0.35);

    border-radius: 10px;

    box-shadow:
        0 0 8px rgba(207, 21, 84, 0.2);
}

#enchantment-description {
    margin-top: 12px;
    margin-bottom: 8px;

    text-align: center;

    color: #e3d5cc;
}

#enchantment-max-level {
    margin-top: 8px;
    margin-bottom: 20px;

    text-align: center;
    font-weight: bold;

    color: #c79cff;

    text-shadow:
        0 0 8px rgba(199, 156, 255, 0.8);
}


/*--Enchantable and incompatible sections--*/

/*Used for both card sections*/
#enchantment-items,
#enchantment-incompatible {
    margin-top: 20px;
    padding: 16px;

    background-color: rgba(30, 20, 15, 0.25);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

/*Used for both card section titles and book calculator title*/
#enchantment-items h3,
#enchantment-incompatible h3,
#book-calculator h2 {
    margin-top: 0;
    margin-bottom: 16px;

    padding-bottom: 8px;

    text-align: center;

    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/*Used for both compatible and incompatible card layouts*/
#enchantment-item-cards,
#incompatible-enchantment-cards {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;

    gap: 12px;
}


/*--Item and enchantment cards--*/

.item-card {
    position: relative;

    width: 128px;
    height: 128px;

    overflow: hidden;

    background-color: #363636;

    border: 1px solid rgba(120, 51, 174, 0.8);
    border-radius: 10px;

    box-shadow:
        0 0 8px rgba(120, 51, 174, 0.8),
        0 0 12px rgba(120, 51, 174, 0.4);

    image-rendering: pixelated;
}

/*Changes incompatible enchantment cards from purple to red*/
.incompatible {
    border-color: rgba(180, 40, 40, 0.8);

    box-shadow:
        0 0 8px rgba(180, 40, 40, 0.7),
        0 0 12px rgba(180, 40, 40, 0.3);
}

.item-card img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.item-name {
    position: absolute;

    bottom: 0;
    left: 0;

    width: 100%;

    padding: 4px 0;

    background-color: rgba(0, 0, 0, 0.4);
    color: white;

    text-align: center;

    border-top: 1px solid rgba(0, 0, 0, 0.7);
}

/*Used when an item or enchantment name is too long for the card*/
.small-text {
    font-size: 13px;
}


/*--Book combination calculator--*/

#book-calculator h2 {
    margin-top: 20px;
}

.level-selector {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;

    padding: 16px;

    text-align: center;

    background-color: rgba(30, 20, 15, 0.25);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.form-group {
    flex: 1;

    min-width: 10px;
}


/*--Book calculator dropdowns--*/

select {
    padding: 10px;

    background-color: #363636;
    color: white;

    border: 1px solid #fcfcfc;
    border-radius: 8px;

    font-size: 16px;
}

.form-group select {
    max-width: 175px;

    background-color: #50392b;

    border-radius: 8px;

    text-align: center;
    text-indent: 15px;
}

.prompt select:hover {
    border-color: #9b6bc2;
}


/*--Book calculator results--*/

.book-result {
    margin-top: 18px;

    text-align: center;
}

.book-result-main {
    font-size: 22px;
    font-weight: bold;

    color: #c79cff;

    text-shadow:
        0 0 6px rgba(199, 156, 255, 0.8),
        0 0 12px rgba(120, 51, 174, 0.5);
}

.book-result-sub {
    margin-top: 4px;

    font-size: 14px;

    color: #e3d5cc;
}

@media (max-width: 700px) {

    #enchantment-item-cards,
    #incompatible-enchantment-cards {
        gap: 8px;
    }

    .item-card {
        width: 80px;
        height: 80px;

        border-radius: 8px;
    }

    .item-name {
        padding: 3px 0;

        font-size: 9px;
    }

    .small-text {
        font-size: 7px;
    }
}