/* Main sections */
body {
    margin: 0;
}

main {
    margin: auto;
    width: 800px;
    border-left: 1px solid black;
    border-right: 1px solid black;
    padding: 10px;
    padding-top: 0px;

    font-family: Arial, Helvetica, sans-serif;
}

footer {
    margin: auto;
    width: 800px;
    background-color: rgb(164, 181, 199);
    padding: 10px;
}

@media (max-width: 850px) {
    main {
        width: 95%;
        border: none;
    }
    footer {
        width: 95%; 
    }
}

/* Components */
.utility {
    padding: 5px;
    border: 1px solid green;
    border-radius: 5px;
    margin-bottom: 10px;

    background-color: rgb(195, 211, 195);
}

.utility h2 {
    margin-top: 0px;
    padding-top: 5px;
}

.utility p {
    margin-top: 5px;
    margin-bottom: 0;
}

/* CHARACTER SHEET COMPONENTS */
.char_information {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
}

.attributes {
    width: 48%;
    box-sizing: border-box;
}
.attributes table {
    width: 100%;
    border-collapse: collapse;
}

.attributes tr {
    border-bottom: 1px solid black;
}

.attributes td {
    padding-left: 5px;
    width: 50%;
}

.inventory {
    width: 48%;
    box-sizing: border-box;
}

.inventory table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.inventory-item {
    border-bottom: 1px solid black;
}

@media (max-width: 500px) {
    
    .attributes {
        width: 90%;
    }

    .inventory {
        width: 90%;
    }
}

.modifiable {
    touch-action: none;
}

/* SHOP COMPONENTS */

.shop_list {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    max-height: 50vh;
    overflow-y: scroll;
}

.shop_item {
    border: 1px solid black;
    border-radius: 3px;
    width: 30%;
    padding: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
    background-color: whitesmoke;
    -webkit-box-shadow: 1px 1px 3px 2px rgba(0,0,0,0.29); 
    box-shadow: 1px 1px 3px 2px rgba(0,0,0,0.29);
}

@media (max-width: 800px) {
    .shop_item {
        width: 45%;
    }
}

@media (max-width: 500px) {
    .shop_item {
        width: 90%;
    }
}

.shop_item > h3 {
    margin-top: 5px;
    text-align: center;
}

.shop_item .item_desc {
    visibility: hidden;
    display: none;
}

.item_desc_show {
    color: blue;
}

.item_desc_show:hover {
    color: darkblue;
    cursor: pointer;
}

.item_desc_hide {
    color: blue;
}

.item_desc_hide:hover{
    color: darkblue;
    cursor: pointer;
}

.purchase_link, .acquire_link {
    color: green;
}

.purchase_link:hover, .acquire_link:hover {
    color: darkgreen;
    cursor: pointer;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* Page-wide element types */
h1 {
    padding-top: 10px;
    margin-top: 0px;
}

label {
    font-size: 0.75em;
}

select {
    padding: 5px;
    border-radius: 5px;
    width: 250px;
    text-align: center;
    /* margin: 5px; */
}

form input {
    margin-bottom: 5px;
}

/* Specific Elements */
#rollform > *, #checklev > * {
    margin-top: 5px;
}

/* Element styles */
.failure {
    color: red;
}

.success {
    color: green;
}

#item_createform textarea {
    width: 100%;
    resize: none;
    box-sizing: border-box;
}

#item_createform #notes_in {
    display: block;
    width: 100%;
    box-sizing: border-box;
}