#target-db-runes, #target-db-cards {
    position: relative;
    padding-top: 10px;
}

table {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 30px;
    border-spacing: 0;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.4);
    table-layout: fixed
}
@media only screen and (max-width: 720px) {
    table {
        font-size: 14px;
    }
}

#tb-runes .odd:not(.header), #tb-cards .odd:not(.header) {
    background-color: #f7f7f7;
}
#tb-runes .even:not(.header), #tb-cards .even:not(.header) {
    background-color: #dee6eb;
}
.last-left {
    border-bottom-left-radius: 10px;
}
.last-right {
    border-bottom-right-radius: 10px;
}

td, th {
    box-sizing: border-box;
    padding: 8px;
    white-space: pre-line;
    line-height: 1.5;
    position: relative;
}

tr:nth-child(odd):not(.header) {
    background-color: #f7f7f7;
}
tr:nth-child(even) {
    background-color: #dee6eb;
}
th:first-of-type {
    border-top-left-radius: 10px;
}
th:last-of-type {
    border-top-right-radius: 10px;
}
tr:last-of-type td:first-of-type {
    border-bottom-left-radius: 10px;
}
tr:last-of-type td:last-of-type {
    border-bottom-right-radius: 10px;
}
tr:last-child:not(.header) {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.db-text-center {
    text-align: center;
}

.db-text-left {
    text-align: start;
}

.header {
    background-color: #555;
    color: white;
    position: relative;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

#col-legacy {
    width: 8%;
}
#col-seasonal {
    width: 8%;
}
#col-id {
    width: 5%;
}
#col-moblv {
    width: 8%;
}
#col-name {
    width: 12%;
}
#col-name-rune {
    width: 15%;
}
#col-effect {
    text-align: start;
}
#col-location {
    width: 15%;
}
#col-description {
    text-align: start;
}
#col-droptier {
    width: 12%;
}

.is-motd {
    font-family: 'Arial Narrow';
    font-weight: 400;
    color: #fc2f6c;
    position: absolute;
    top: 50%;
    left: -20px;
    user-select: none;
    transform: translate(0, -50%);
    writing-mode: vertical-lr;
    line-height: 1;
    cursor: pointer;
}

#search-cards, #search-runes {
    text-align: center;
    width: 60%;
    border-radius: 10px;
    margin: 5px auto;
    padding: 10px;
    font-size: 1.4em;
    border: 1px solid rgba(0,0,0,0.4);
    box-sizing: border-box;
}

@media only screen and (max-width: 740px) {
    #search-cards, #search-runes {
        width: 100%;
        font-size: 1em;
    }
}

@media only screen and (max-width: 350px) {
    #search-cards, #search-runes {
        font-size: 0.9em;
    }
}

.filter-bt {
    position: absolute;
    top: -19px;
    left: 8%;
    right: 8%;
    z-index: 2;
    border-radius: 6px 6px 0 0;
    border: 1px solid rgba(0,0,0,0.4);
}
.filter-bt:hover {
    cursor: pointer;
    -webkit-filter: brightness(1.1);
    filter: brightness(1.1);
}

#copy-clipboard {
    position: absolute;
    top: 25px;
    right: 5px;
    z-index: 1;
    cursor: pointer;
    border: none;
    background-color: transparent;
    background-image: url(/static/img/icon_copy.svg);
    background-size: 14px;
    height: 14px;
    width: 14px;
}
#copy-clipboard:hover {
    box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6);
}

#item-count {
    display: inline;
    position: absolute;
    top: 0;
    right: 200px;
}
@media only screen and (max-width: 740px) {
    #item-count {
        right: 0;
        top: 3px;
        font-size: 14px;
    }
}

#search-cards-maxlv {
    position: absolute;
    top: -19px;
    left: 8%;
    right: 8%;
    text-align: center;
    border-radius: 4px 4px 0 0;
    border: 1px solid rgba(0,0,0,0.4);
}

.sortable th {
    cursor: pointer;
}
.sortable th.no-sort {
    pointer-events: none;
}
.sortable th::after,
.sortable th::before {
    transition: color 0.2s ease-in-out;
    font-size: 1.2em;
    color: transparent;
}
.sortable th::after {
    margin-left: 3px;
    content: '\025B8';
}
.sortable th:hover::after {
    color: inherit;
}
.sortable th.dir-d::after {
    color: inherit;
    content: '\025BE';
}
.sortable th.dir-u::after {
    color: inherit;
    content: '\025B4';
}

.mob-rms {
    position: relative;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 4px;
    cursor: default;
    padding: 2px;
}

.mob-rms .rms-iframe {
    text-align: left;
    font-size: 0.9em;
    line-height: 1.4;
    visibility: hidden;
    width: 720px;
    height: 506px;
    background-color: #94C4EC;
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    position: fixed;
    z-index: 15;
    top: 25vh;
    left: 40vw;
    opacity: 0;
    transition: opacity 0.5s;
    white-space: pre-line;
    overflow: hidden;
}

.rms-iframe iframe{
    position: absolute;
    top: -88px;
    left: -49px;
}

.mob-rms:hover .rms-iframe {
    visibility: visible;
    opacity: 1;
}

.iframe-alt {
    color: black;
    font-size: 1.3em;
    margin-top: 150px;
}

@media only screen and (max-width: 1172px) {
    #tb-cards th {
        font-size: 14px;
    }
}

@media only screen and (max-width: 1065px) {
    #tb-cards td {
        font-size: 14px;
    }

    #tb-cards th {
        font-size: 12px;
    }
}

@media only screen and (max-width: 940px) {
    #tb-cards th {
        font-size: 10px;
    }
}

@media only screen and (max-width: 840px) {
    #tb-cards th {
        font-size: 8px;
    }
}

@media only screen and (max-width: 720px) {
    #tb-cards tr {
        display: grid;
        grid-template-columns: 40px 40px auto;
        grid-template-rows: auto auto auto;
    }
    #tb-cards .header {
        grid-template-columns: 85px 85px auto;
    }

    #tb-cards th {
        padding: 2px 8px;
        font-size: 14px;
    }

    #tb-cards .db-text-center {
        text-align: start;
    }

    #col-legacy,
    #col-seasonal,
    #col-id,
    #col-moblv,
    #col-name,
    #col-description,
    #col-droptier {
        display: block;
        width: auto;
    }

    #col-id,
    td[headers="col-id"] {
        grid-column: 1;
        grid-row: 1;
    }

    #col-moblv,
    td[headers="col-moblv"] {
        grid-column: 2;
        grid-row: 1;
    }

    #col-name,
    td[headers="col-name"] {
        grid-column: 3;
        grid-row: 1;
    }

    #col-legacy,
    td[headers="col-legacy"] {
        grid-column: 1;
        grid-row: 2;
    }

    #col-seasonal,
    td[headers="col-seasonal"] {
        grid-column: 2;
        grid-row: 2;
    }

    #col-effect,
    td[headers="col-effect"] {
        grid-column: 3;
        grid-row: 2 / span 2;
    }

    #col-droptier,
    td[headers="col-droptier"] {
        grid-column: 1 / span 2;
        grid-row: 3;
    }

    td[headers="col-name"] {
        font-weight: bold;
        display: flex;
        justify-content: space-between;
    }

    td[headers="col-id"]{
        color: #888;
    }
    td[headers="col-moblv"]:before {
        content: "Lv";
        font-size: 10px;
        color: #888;
    }
    td[headers="col-droptier"] {
        color: #888;
        align-self: end;
    }

    .filter-bt {
        top: -48px;
    }
    #search-cards-maxlv.sc-login {
        left: 100%;
        right: -72%;
    }

    .mob-rms {
        padding: 0;
    }
    .mob-rms .rms-iframe {
        display: none;
    }
    .is-motd {
        position: initial;
        top: initial;
        left: initial;
        left: initial;
        transform: initial;
        writing-mode: initial;
        line-height: 21px;
    }
}

@media only screen and (max-width: 550px) {
    #tb-runes tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }

    #tb-runes th {
        padding: 2px 8px;
    }

    #tb-runes .db-text-center {
        text-align: start;
    }

    #col-name-rune,
    #col-location,
    #col-description {
        display: block;
        width: auto;
    }

    #col-description,
    td[headers="col-description"] {
        grid-column: span 2;
    }

    td[headers="col-name-rune"] {
        font-weight: bold;
    }

    td[headers="col-location"] {
        color: #888;
    }
}