* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
img {
    max-width: 100%;
}
.list-reset {
    list-style-type: none;
    padding: 0;
}
.list-reset a, .link-reset {
    text-decoration: none;
    color: unset;
    display: block;
    cursor: pointer;
}


/* ===================================== */

body {
    overflow: hidden;
    font-family: 'Roboto Mono', monospace;
}

.pan {
    width: 100vw;
    height: 100vh;
}

.row {
    display: flex;
}

:root {
    --white: hsla(0, 0%, 100%, 1);
    --container-background: hsla(0, 0%, 20%, 0.9);
    --headline-background: hsla(0, 0%, 15%, 0.9);
    --table-content: hsla(0, 0%, 30%, 0.9);
    --border-color: hsla(0, 0%, 0%, 1);

    --radius: 0.35rem;
}

/* ===================================== */



.wrapper{
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: space-between;

    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    height: 88%;
    width: 80%;

    pointer-events: none;
}



/* ===================================== */



.search-container {
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    width: 100%;
    pointer-events: all;

    max-width: 26rem;
}

.search-fieldset {
    border: 3px solid var(--border-color);
    color: var(--white);
    padding: 0.6rem;
    border-radius: var(--radius);
    background-color: var(--container-background);
    text-align: center;

    font-size: 1.6rem;
    font-weight: 900;
}

legend {
    background-color: var(--headline-background);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    margin: 0 auto; /* center legend in firefox */
}

.search-input{
    border-radius: var(--radius);
    background-color: var(--white);
    width: 90%;
    height: 2.375rem;
	border: none;

    font-size: 1.15rem;
    padding-left: 1rem;
}

.form {
    gap: 1rem;
    margin: 0.5rem 0;
    justify-content: center;
    align-items: center;
}

.submit-btn {
    border-radius: var(--radius);
    height: 2.375rem;

    cursor: pointer;
    pointer-events: all;
    border: none;

    transform: scale(1);
    transition: transform .2s;
}

.submit-btn:hover {
    transform: scale(1.15);
}

.submit-btn:active {
    transform: scale(0.9);
    opacity: 0.75;
}

.submit-btn img {
    height: 2.375rem;
    min-width: 2.375rem;
    border-radius: var(--radius);
    background-color: var(--white);
    padding: 0.25rem;
}

/* ===================================== */



.table {
    visibility: hidden;
    scale: 0;

    color: var(--white);
    font-size: 0.875rem;

    background-color: var(--container-background);
    border: 3px solid var(--border-color);
    padding: 0.6rem;
    border-radius: var(--radius);
    pointer-events: all;
}

.table td,
.table th  {
    padding: 0.5rem;
}

.table-head tr th {
    background-color: var(--headline-background);
    border-radius: var(--radius);
    font-size: 1.2rem;
}

#th-name {
    padding: 0 1rem;
    white-space: pre-wrap;
}

.item-img {
    width: 40px;
    height: 40px;
    -webkit-filter: drop-shadow(4px 4px 4px rgba(0,0,0,0.5));
    filter: drop-shadow(4px 4px 4px rgba(0,0,0,0.5));
}

.table-body tr th:nth-child(1) {
    min-width: 3.3125rem; /* width for item icon */
}

.table-body tr th {
    min-width: 8.5rem; /* width for data cells */
}

.table-body tr th,
.table-body tr td {
    background-color: var(--table-content);
    border-radius: var(--radius);
    text-align: center;
}

.visible {
    visibility: visible;
    scale: 1;
    transition: all 0.5s;
}



/* ===================================== */

@media only screen and (min-width: 380px) {
    .search-fieldset,
    .table {
        padding: 0.8rem;
    }
}


@media only screen and (min-width: 700px) {
    .wrapper{
        flex-direction: column;
        height: 90%;
    }

    .table {
        font-size: 1.15rem;
    }

    .table td,
    .table th  {
        padding: 0.5rem;
    }

    .item-img {
        width: 48px;
        height: 48px;
    }

    .table-head tr th {
        font-size: 1.25rem;
    }

    .table-body tr th:nth-child(1) {
        min-width: 4.3125rem; /* width for item icon */
    }
    
    .table-body tr th {
        min-width: 15rem; /* width for data cells */
    }
    
}