/* Character Equipment
-----------------------------------------------------------------------------*/
.equipment {
    position: absolute;
    z-index: 3;
    border: none !important;
}

.equipment img {
    position: relative;
    width: 90%;
    height: 90%;
    padding: 5px 5px;
    border: none !important;
}

.left-hand {
    margin-top: 220px;
    width: 65px;
    height: 125px;
    margin-left: 10px;
}

.right-hand {
    margin-top: 220px;
    margin-left: 327px;
    height: 130px;
}

.helm {
    margin-top: 30px;
    margin-left: 65px;
    width: 70px;
    height: 80px;

}

.armor {
    margin-top: 110px;
    width: 80px;
    height: 100px;
    margin-left: 37px;
}

.pants {
    margin-top: 147px;
    margin-left: 275px;
    height: 70px;
}

.gloves {
    margin-top: 275px;
    margin-left: 82px;
    width: 70px;
}

.boots {
    margin-top: 273px;
    margin-left: 250px;
    width: 70px;
}

.wings {
    margin-top: 40px;
    margin-left: 270px;
    width: 130px;
    height: 110px;
}

.imp {
    margin-top: 100px;
}

.pendant {
    margin-top: 50px;
    margin-left: 225px;
    height: 45px;
    width: 45px;
}

.left-ring {
    margin-top: 220px;
    margin-left: 95px;
    height: 40px;
    width: 40px;
}

.right-ring {
    margin-top: 222px;
    margin-left: 270px;
    border: 1px solid #FFF;
    height: 40px;
    width: 40px;
}

/* Default Form Alert Messages
-----------------------------------------------------------------------------*/
.form-alert {
    opacity: 0;
    animation: hideafter 5s normal forwards;
    font-weight: 600;
    text-shadow: 1px 1px #000;
    color: white;
    position: marker;
    font-size: 9pt;
    padding: 2px 2px;
}

.alert {
    opacity: 1;
    animation: hideafter 5s normal forwards;
    position: absolute;
    z-index: 90000;
    top: 400px;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 1px 1px #000;
    color: white;
    right: 0;
    padding: 20px 20px;
}

@keyframes hideafter {
    0%, 80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.alert-error {
    background: rgba(217, 0, 0, 0.5);
}

.alert-success {
    background: rgba(0, 217, 0, 0.5);
}

.alert-info {
    background: rgba(0, 0, 217, 0.5);
}

.theme-switch {
    position: absolute;
}

.theme-switch button {
    display: block;
    width: 100px;
    margin: 5px 5px;
    padding: 5px 5px;
}

.theme-switch select {
    padding: 12px 15px;
    border-radius: 5px;
    position: relative;
    font-size: 11px;
    -webkit-appearance: none;
    background-image: url(../default-images/select-icon.png);
    background-position: right 15px center;
    background-repeat: no-repeat;
    -moz-appearance: none;
    text-indent: 0.01px;
    text-overflow: '';
    -ms-appearance: none;
    appearance: none !important;
    min-width: 200px;
    cursor: pointer;
}

.theme-switch select:focus {
    border: 1px solid #425173;
}

.theme-switch select::-ms-expand {
    display: none;
}

/* Logout is a POST form so the action carries a CSRF token. The button keeps the
   look of the link it replaces in every theme. */
.logout-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.logout-button {
    background: none;
    border: 0;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.logout-button:hover {
    text-decoration: underline;
}

/* Tabular pages: the authenticated account area and the rankings page. Only
   rhythm and borders are defined here: colour and typography stay inherited, so
   the pages sit inside every one of the seven themes instead of fighting them. */
.data-page {
    margin: 0 auto;
    padding: 10px 15px;
    max-width: 100%;
}

.data-facts {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

.data-facts li {
    margin: 3px 0;
}

.data-fact-label {
    display: inline-block;
    min-width: 120px;
    font-weight: bold;
}

/* The table keeps its columns on one line and scrolls sideways on a phone,
   so no theme has to be rewritten for a narrow screen. */
.data-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.data-table {
    border-collapse: collapse;
    margin: 0 0 12px;
}

.data-table th,
.data-table td {
    border: 1px solid rgba(128, 128, 128, .45);
    padding: 6px 10px;
    text-align: left;
    white-space: nowrap;
}

.data-table th {
    font-weight: bold;
}

.account-back {
    display: inline-block;
    margin-top: 6px;
}

.account-back + .account-back {
    margin-left: 12px;
}

/* Rankings page: one row of tabs above a single table. */
.ranking-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px;
}

.ranking-tab {
    border: 1px solid rgba(128, 128, 128, .45);
    border-radius: 4px;
    padding: 4px 10px;
}

.ranking-tab.active {
    font-weight: bold;
    text-decoration: underline;
}

.ranking-rank {
    text-align: right;
}

.ranking-empty {
    text-align: center;
}

/* Password change form. Like the tabular pages, only rhythm and borders are
   defined here: colour and typography stay inherited so the form sits inside
   every one of the seven themes instead of fighting them. */
.data-form {
    max-width: 320px;
    margin: 0 0 12px;
}

.data-field {
    margin: 0 0 10px;
}

.data-field label {
    display: block;
    font-weight: bold;
    margin: 0 0 4px;
}

.data-field input,
.data-field select {
    box-sizing: border-box;
    width: 100%;
    padding: 5px 8px;
    border: 1px solid rgba(128, 128, 128, .45);
    border-radius: 4px;
    font: inherit;
}

/* The write actions on the private character page: one short form each, kept
   apart from the read-only facts above them. */
.data-actions {
    margin: 18px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(128, 128, 128, .45);
}

.data-actions-title {
    margin: 0 0 10px;
}

.data-hint {
    margin: 0 0 10px;
}

/* A checkbox sits next to its own label, so the box must not take the width the
   text fields above it take. */
.data-check label {
    font-weight: normal;
}

.data-check input[type="checkbox"] {
    width: auto;
    margin: 0 6px 0 0;
    vertical-align: middle;
}

.data-submit {
    padding: 5px 14px;
    border: 1px solid rgba(128, 128, 128, .45);
    border-radius: 4px;
    font: inherit;
    cursor: pointer;
}

/* Small inline marker, such as the guild master in the member list. */
.data-tag {
    border: 1px solid rgba(128, 128, 128, .45);
    border-radius: 4px;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 85%;
}

/* Shop. The same rule as the pages above: rhythm, borders and a grid that
   reflows, with colour and typography left to the theme. */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.shop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(128, 128, 128, .45);
    border-radius: 4px;
    padding: 10px 8px;
    text-decoration: none;
}

.shop-card-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.shop-card-name {
    font-weight: bold;
    margin: 6px 0 2px;
}

.shop-card-category {
    font-size: 85%;
    opacity: .8;
}

.shop-card-price {
    margin-top: 6px;
}

.shop-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
}

.shop-detail-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.shop-detail .data-facts {
    margin: 0;
}