/*
 * Mobile overrides for the legacy Kertas template.
 * Kept separate so the PHP 5.6 application logic remains untouched.
 */

@media screen and (max-width: 991px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body > .wrapper {
        margin-top: 60px;
    }

    body > .header {
        position: fixed;
        min-height: 60px;
    }

    body > .header .logo {
        width: 120px;
        min-width: 120px;
        height: 60px;
        min-height: 60px;
        padding: 0 6px;
        position: fixed;
    }

    body > .header .logo img {
        max-width: 100%;
        height: auto;
    }

    body > .header .navbar {
        margin-left: 120px;
        height: 60px;
        min-height: 60px;
    }

    .navbar .navbar-right {
        float: none;
        height: auto;
        min-height: 60px;
        padding-left: 0;
    }

    .navbar-nav {
        margin: 10px 8px 0 0;
    }

    .header-action-label {
        display: none;
    }

    .addCash-btn {
        width: 38px;
        height: 34px;
        padding: 6px !important;
        font-size: 12px;
    }

    .addCash-btn img {
        max-width: 25px;
        max-height: 18px;
    }

    .language-menu .btn,
    .mobile-menu-item .btn {
        height: 34px;
        padding: 6px 9px;
    }

    .mobile-menu-item {
        display: block;
    }

    .navbar-menu,
    .profile-menu {
        position: static;
    }

    .navbar-right ul.navbar-nav > li {
        margin-right: 6px;
    }

    .navbar-menu > img {
        display: none;
    }

    .addCash-btn {
        max-width: 150px;
        padding: 6px 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .addCash-btn img {
        max-width: 48px;
        height: auto;
    }

    .left-side {
        display: none;
        position: relative;
        width: 100%;
        left: 0 !important;
        right: auto !important;
        top: auto;
        z-index: 1;
    }

    .row-offcanvas-left .sidebar-offcanvas {
        left: 0 !important;
    }

    body.mobile-sidebar-open .left-side {
        display: block;
    }

    .left-side .sidebar {
        position: relative !important;
        width: 100% !important;
    }

    .left-side .level,
    .left-side .discount-flag {
        display: none;
    }

    .left-side .sidebar {
        padding-top: 1px;
        padding-bottom: 12px;
    }

    .sidebar .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
    }

    .sidebar .sidebar-menu > li {
        width: 50%;
    }

    .right-side {
        margin-left: 0;
        overflow: visible;
    }

    .right-side > .content {
        padding: 0 12px 20px;
    }

    .right-side > .content-header {
        padding: 12px;
    }

    .right-side > .content-header > .fa {
        font-size: 2.4em;
    }

    .right-side > .content-header > span {
        display: block;
        font-size: 1.35em;
        line-height: 1.25;
    }

    .content center {
        display: block;
        width: 100%;
    }

    .content .row {
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: -10px;
        margin-right: -10px;
    }

    .content [class*="col-"] {
        float: none;
        width: 100%;
    }

    .content .modal-content,
    .grid,
    .box {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .inventory-scroll {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 2px;
    }

    .inventory-scroll:focus {
        outline: 2px solid #299bea;
        outline-offset: 2px;
    }

    /* the bag only: the doll with the worn things does not fit and nothing can be sold from it; the slots wrap to the screen width */
    #inventory {
        display: block;
        min-width: 0;
        padding: 8px;
        box-sizing: border-box;
    }

    #char_img,
    .mini-shells,
    .foot-shells,
    .left-shells,
    .right-shells {
        display: none;
    }

    .inventory-main.pull-left {
        float: none !important;
        width: 100%;
    }

    .inventory-main .inventory-table {
        display: block;
        width: 100%;
        border: 0;
        overflow: hidden;
    }

    .inventory-main .inventory-table tbody,
    .inventory-main .inventory-table tr {
        display: contents;
    }

    .inventory-main .inventory-table td {
        display: block;
        float: left;
        box-sizing: border-box;
        width: 36px;
        height: 36px;
        border: 1px solid #777;
        margin: 0 -1px -1px 0;
    }

    /* the windows of the sale stay on the screen (the bag is a scrolling box that would cut them) */
    .modal-l2-auctioned-items,
    .modal-l2-no-auctioned {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        width: 290px;
        max-width: calc(100vw - 24px);
        box-sizing: border-box;
        height: auto !important;
        padding: 14px 10px 64px;
        background: #1b1a18;
        z-index: 1000;
    }

    .modal-l2-auctioned-items input {
        width: 100%;
        height: 38px;
        margin-bottom: 8px;
        box-sizing: border-box;
    }

    .modal-l2-auctioned-items .modal-l2-price {
        margin-top: 0;
    }

    .inventory-head {
        height: auto;
        overflow: hidden;
        margin-bottom: 8px;
        font-size: 14px;
        line-height: 22px;
    }

    .inventory-foot {
        clear: both;
        padding: 14px 0 0 0;
    }

    .modal-dialog,
    .modal-wrapper {
        width: calc(100vw - 24px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    .modal-wrapper .col-sm-6,
    .modal-wrapper select,
    .modal-wrapper input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]) {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .modal-wrapper hr {
        width: 100% !important;
    }

    .grid .grid-header {
        height: auto;
        min-height: 40px;
    }

    .grid .grid-header .actions,
    .grid .grid-header .pull-right {
        float: none !important;
        display: block;
        margin-top: 8px;
        text-align: left;
    }

    .grid-body.table-responsive {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 720px;
    }

    .modal-donate-back,
    .modal-donate-back .modal-dialog,
    #massReply,
    #massReply .modal-dialog,
    #win-item-auction {
        width: calc(100vw - 20px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 20px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .modal-donate-back .modal-body,
    .modal-donate-back .modal-header,
    .modal-donate-back .modal-footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    .modal-donate-back .modal-body .control-label,
    .global-form .control-label,
    .createTicket .control-label {
        display: block;
        width: 100%;
        line-height: 1.4;
        margin-bottom: 5px;
    }

    .modal-donate-back .modal-body #addCashAmount,
    .global-form select,
    .global-form input:not([type=file]):not([type=submit]),
    .createTicket select,
    .createTicket input:not([type=file]):not([type=submit]),
    .inputFileStyle {
        width: 100% !important;
    }

    .global-form .help-block {
        margin-left: 0;
    }

    .global-form .box {
        min-width: 0;
        width: 100%;
    }

    .auction-tool-left,
    .auction-tool-center {
        display: block;
        width: 100%;
        margin-left: 0;
        min-height: 0;
    }

    .type-filter,
    .nav-auction-page {
        width: 100%;
    }

    .type-filter,
    .nav-auction-page,
    .grade-filter {
        display: flex;
        flex-wrap: wrap;
        height: auto;
    }

    .type-filter-title,
    .nav-auction-title {
        width: 100%;
        margin-top: 0;
    }

    .type-filter-el,
    .nav-auction-page a,
    .grade-filter-el {
        flex: 1 1 45%;
        height: auto;
        min-height: 36px;
        line-height: 1.2;
        padding: 10px;
    }

    .type-filter-el:first-of-type {
        margin-top: 1px;
    }

    .auction-tool-top {
        height: auto;
    }

    .auction-filter-top,
    .grade-filter {
        width: 100%;
        float: none;
    }

    .auction-filter-top {
        height: auto;
        overflow: hidden;
        padding-bottom: 8px;
    }

    .type-filter-el,
    .nav-auction-page a,
    .grade-filter-el {
        font-size: 15px;
    }

    .enchant-filter,
    .sort-filter {
        float: none;
        height: auto;
        line-height: 34px;
        margin: 0 10px;
        font-size: 14px;
    }

    .auction-table-noItem {
        font-size: 18px;
    }

    .auction-table-head {
        display: none;
    }

    .auction-table-row {
        display: block;
        min-height: 0;
        padding: 12px;
    }

    .auction-table-row > div {
        padding: 5px 0;
        font-size: 15px;
    }

    /* every number of a lot says what it is (the table head is hidden on a phone) */
    .auction-table-row [data-label]::before {
        content: attr(data-label) ": ";
        color: #889fab;
    }

    .auction-table-row > div.auction-table-timer-end {
        font-size: 0;
    }

    .auction-table-timer-end[data-label]::before {
        content: none;
    }

    .auction-table-img,
    .auction-table-name,
    .auction-table-nowPrice,
    .auction-table-buyPrice,
    .auction-table-stepPrice,
    .auction-table-timer,
    .auction-table-timer-end,
    .auction-table-actions {
        display: block;
        width: 100%;
        text-align: left;
    }

    .auction-button {
        max-width: 220px;
    }

    .available-auc {
        position: static;
        margin-top: 12px;
    }

    .available-auc-text,
    .available-auc-btn {
        display: block;
    }

    .available-auc-text {
        font-size: 16px;
    }

    .available-auc-btn a {
        display: inline-block;
        margin: 10px 0 0;
        line-height: 36px;
        font-size: 15px;
        border-width: 3px;
    }
}

@media screen and (max-width: 560px) {
    body > .wrapper {
        margin-top: 60px !important;
    }

    body > .header .logo {
        display: none;
    }

    body > .header .navbar {
        width: 100%;
        margin-left: 0;
    }

    .navbar-nav {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        margin: 10px 4px 0 0;
    }

    .navbar .navbar-nav > li {
        float: left;
    }

    .navbar-right ul.navbar-nav > li {
        flex: 0 0 auto;
        margin-right: 3px;
    }

    .navbar-right ul.navbar-nav > li > a,
    .navbar-right ul.navbar-nav > li.navbar-menu > a,
    .navbar-right ul.navbar-nav > li.profile-menu > a {
        padding: 6px;
    }

    .navbar-right ul.navbar-nav > li > a {
        display: block;
        height: 34px;
        line-height: 22px;
    }

    ul.navbar-nav li.language-menu .dropdown-menu {
        position: fixed;
        top: 52px;
        right: 6px;
        left: auto;
    }

    .sidebar .sidebar-menu > li {
        width: 100%;
    }

    .right-side > .content-header > .breadcrumb {
        display: none;
    }

    .right-side > .content {
        padding-left: 8px;
        padding-right: 8px;
    }

    .grid .grid-header {
        padding-left: 12px;
        padding-right: 12px;
    }

    .grid .grid-header .actions .btn,
    .grid .grid-header .pull-right .btn {
        margin-bottom: 5px;
    }

    .table {
        min-width: 640px;
    }
}

@media screen and (max-width: 360px) {
    body .navbar .navbar-menu {
        display: block !important;
    }
}

@media screen and (min-width: 992px) {
    .mobile-menu-item {
        display: none;
    }
}

/* a lot nobody has bid on: the timer starts with the first bid */
.auction-table-timer-wait {
    flex: 0 0 15%;
    font-size: 13px;
    line-height: 1.3;
    color: #9fc7a0;
}

/* the dialog of a bought lot: a visible close button (cross) and a cancel button */
.win-item-auction-close {
    position: absolute;
    top: 0;
    right: 0;
    float: none;
    margin: 0;
    width: 40px;
    height: 40px;
    background: #7b241c none;
    color: #fff;
    font-size: 28px;
    line-height: 40px;
    text-align: center;
    z-index: 2;
}

.win-item-auction-close::before {
    content: "\00d7";
}

.win-item-auction-close:hover {
    background: #a93226;
}

.win-lot-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.win-lot-button,
.win-lot-close {
    margin: 0;
    min-width: 130px;
    padding: 0 12px;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    font-family: Tahoma, sans-serif;
    text-align: center;
    cursor: pointer;
    color: #e6d9be !important;
    background-size: 100% 100%;
}

.win-lot-close {
    background: url(../img/l2/l2-button.jpg) no-repeat;
    background-size: 100% 100%;
}

.win-lot-close:hover {
    background-image: url(../img/l2/l2-button_hover.jpg);
}

@media screen and (max-width: 991px) {
    #win-item-auction {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 24px) !important;
        max-width: 420px !important;
        max-height: 90vh;
        overflow-y: auto;
        margin: 0 !important;
        box-sizing: border-box;
    }

    .win-item-header {
        min-height: 40px;
    }

    .win-item-title {
        margin-left: 24px;
        line-height: 40px;
        font-size: 16px;
    }

    #win-item-auction .win-item-body {
        padding: 14px;
    }

    .win-item-list-title,
    .win-char-list-title {
        font-size: 17px;
        line-height: 1.3;
    }
}

/* my lots: the account and the character the lot came from */
.auction-lot-from {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
    color: #889fab;
}

.auction-lot-from b {
    color: #c9d4da;
    font-weight: normal;
}

/* the number of bids of a lot */
.auction-lot-bids {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: #889fab;
}

.auction-lot-bids b {
    color: #f0c040;
}

/* the state of my bid in the lists of the open lots */
.auction-lot-mine {
    margin-top: 4px;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
}

.auction-lot-lead {
    color: #6fd36f;
}

.auction-lot-out {
    color: #ff7b6b;
}

/* the history page of the auction */
.auction-history-title {
    padding: 12px;
    font-size: 18px;
    color: #d5cfab;
    border-bottom: 1px solid #404040;
}

.auction-history-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 12px;
    color: #A3A0A3;
    border-bottom: 1px solid #404040;
}

.ah-time {
    flex: 0 0 130px;
    font-size: 13px;
    color: #889fab;
}

.ah-action {
    flex: 0 0 150px;
    font-weight: bold;
}

.ah-h_bid {
    color: #d5cfab;
}

.ah-h_buynow {
    color: #6fd36f;
}

.ah-h_sold {
    color: #e6b45a;
}

.ah-item {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d6d6d6;
}

.ah-item img {
    width: 32px;
    height: 32px;
}

.ah-sum {
    flex: 0 0 170px;
}

.ah-status {
    flex: 1 1 200px;
    font-size: 13px;
    color: #9fc7a0;
}

/* the dialog that puts a bought item to the auction again */
/* a solid dialog: the title is inside the box, the page does not shine through */
#win-relist {
    background: #111;
    border: 1px solid #3e5762;
    padding: 0 0 14px;
    color: #e6e6e6;
}

#win-relist .win-item-header {
    position: relative;
    min-height: 40px;
    padding: 8px 50px 8px 14px;
    background: #1b1b1b;
    border-bottom: 1px solid #3e5762;
}

#win-relist .win-item-title {
    position: static;
    margin: 0;
    font-size: 18px;
    line-height: 24px;
    color: #fff;
}

#win-relist .win-item-body {
    padding: 10px 14px 0;
    border: 0;
    background: transparent;
}

#win-relist .win-item-list-title {
    margin: 0 0 6px;
    font-size: 17px;
    color: #d5cfab;
}

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

.relist-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.3;
    color: #c9d4da;
}

.relist-input {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    font-size: 16px;
    color: #fff;
    background: #111;
    border: 1px solid #3e5762;
    border-radius: 0;
    outline: none;
}

.relist-go,
.relist-close {
    min-width: 130px;
    padding: 0 12px;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    font-family: Tahoma, sans-serif;
    text-align: center;
    cursor: pointer;
    color: #e6d9be !important;
    background: url(../img/l2/l2-button.jpg) no-repeat;
    background-size: 100% 100%;
}

.relist-go:hover,
.relist-close:hover {
    background-image: url(../img/l2/l2-button_hover.jpg);
}

@media screen and (max-width: 991px) {
    #win-relist {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 24px) !important;
        max-width: 420px !important;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* the link of an item in the history and the page of a lot */
.ah-link {
    color: #d6d6d6;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.ah-link:hover,
.ah-link:focus {
    color: #fff;
    text-decoration: underline;
}

.auction-lot-page {
    padding: 16px;
    color: #A3A0A3;
}

.alp-head {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    color: #e6e6e6;
}

.alp-head img {
    width: 40px;
    height: 40px;
}

.alp-state {
    display: inline-block;
    margin: 12px 0 6px;
    padding: 6px 12px;
    font-size: 18px;
    font-weight: bold;
    border: 1px solid #3e5762;
    background: #1b1b1b;
}

.alp-open {
    color: #6fd36f;
}

.alp-sold {
    color: #e6b45a;
}

.alp-closed {
    color: #ff9a8a;
}

.alp-me {
    margin: 4px 0;
    font-size: 16px;
    color: #c9d4da;
}

.alp-facts {
    margin: 12px 0;
    font-size: 16px;
    line-height: 1.8;
}

.alp-facts span {
    color: #889fab;
}

.alp-facts b {
    color: #e6e6e6;
    font-weight: normal;
}

.alp-log-title {
    margin: 14px 0 6px;
    font-size: 16px;
    font-weight: bold;
    color: #d5cfab;
}

.alp-log-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 6px 0;
    font-size: 15px;
    border-top: 1px solid #2d2d2d;
}

.alp-log-time {
    flex: 0 0 130px;
    color: #889fab;
}

.alp-log-who {
    flex: 0 0 120px;
}

.alp-log-mine .alp-log-who {
    color: #6fd36f;
    font-weight: bold;
}

.alp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.alp-actions a {
    display: inline-block;
    padding: 10px 18px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    background: #2b5870;
    border: 1px solid #4a8fb3;
}

.alp-actions a:hover,
.alp-actions a:focus {
    background: #3a7a9c;
    color: #fff;
}

/* the big notice of the site (bid, withdraw...) is smaller on a phone */
@media screen and (max-width: 991px) {
    /* liliumEffect.css comes later and sets 35px: the selector is stronger and the size is important */
    html body .liliumEff-notify-box {
        font-size: 22px !important;
        padding: 0 16px;
        box-sizing: border-box;
    }
}

/* more grades in the filter: the row wraps on a wide screen */
@media screen and (min-width: 992px) {
    /* the types and the navigation are rows above the lots, not a tall black column on the left */
    .auction-tool-left {
        display: block;
        width: 100%;
        min-height: 0;
        height: auto !important;
        background: transparent;
        margin-bottom: 8px;
    }

    .type-filter,
    .nav-auction-page {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        width: auto;
        margin-top: 0;
    }

    .nav-auction-page {
        margin-top: 6px;
    }

    .type-filter-title,
    .nav-auction-title {
        margin: 0 10px 0 0;
        padding: 0;
        color: #555;
        font-weight: bold;
    }

    .type-filter-el,
    .type-filter-el:first-of-type,
    .nav-auction-page a {
        margin: 1px;
        padding: 0 18px;
        background: #111;
    }

    .type-filter-el.active,
    .type-filter-el:hover,
    .nav-auction-page a.active,
    .nav-auction-page a:hover {
        background: #4d4d4d;
    }

    .auction-tool-center {
        display: block;
        width: 100%;
        margin-left: 0;
    }

    .auction-tool-top {
        height: auto;
        min-height: 70px;
    }

    /* the captions of the columns may wrap on a narrower screen: the head grows and does not cover the first lot */
    .auction-table-head {
        height: auto;
        min-height: 31px;
    }

    .auction-filter-top {
        height: auto;
        min-height: 40px;
        overflow: hidden;
    }

    .grade-filter {
        flex-wrap: wrap;
        width: 70%;
        height: auto;
    }
}

@media screen and (max-width: 991px) {
    .auction-history-row > div {
        flex: 1 1 100%;
        font-size: 15px;
    }

    .ah-time,
    .ah-status {
        font-size: 14px;
    }
}

/* the dialog of the item (bid, buy, get): solid, the title is inside the box, the page does not shine through */
#win-item-auction {
    background: #111;
    border: 1px solid #3e5762;
    color: #e6e6e6;
}

#win-item-auction .win-item-header {
    position: relative;
    min-height: 40px;
    padding: 8px 50px 8px 14px;
    background: #1b1b1b;
    border-bottom: 1px solid #3e5762;
}

#win-item-auction .win-item-title {
    position: static;
    margin: 0;
    font-size: 18px;
    line-height: 24px;
    color: #fff;
}

#win-item-auction .win-item-body {
    background: transparent;
}

/* one look for all the dialogs of the auction: a solid box with a title, the same width, the same buttons */
#modal-pace-ber .modal-l2-wp,
#modal-buy-now .modal-l2-wp,
#modal-get-lot .modal-l2-wp {
    position: relative;
    top: auto;
    left: auto;
    margin: 0 auto;
    width: 420px;
    max-width: calc(100vw - 24px);
    height: auto;
    box-sizing: border-box;
    padding: 0 0 14px;
    background: #111;
    border: 1px solid #3e5762;
    box-shadow: none;
    color: #e6e6e6;
}

.dlg-head {
    min-height: 40px;
    padding: 8px 14px;
    background: #1b1b1b;
    border-bottom: 1px solid #3e5762;
    font-size: 18px;
    line-height: 24px;
    color: #fff;
}

#modal-pace-ber .modal-l2-delete-items-info,
#modal-buy-now .modal-l2-delete-items-info,
#modal-get-lot .modal-l2-delete-items-info {
    padding: 12px 14px 0;
}

#modal-pace-ber .delete-l2-items-info_right,
#modal-buy-now .delete-l2-items-info_right,
#modal-get-lot .delete-l2-items-info_right {
    width: calc(100% - 34px);
    font-size: 17px;
    line-height: 22px;
}

#modal-pace-ber .modal-l2-place-ber-button,
#modal-buy-now .modal-l2-place-ber-button,
#modal-get-lot .modal-l2-place-ber-button {
    position: static;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}

#modal-pace-ber .modal-l2-cancel,
#modal-buy-now .modal-l2-cancel,
#modal-get-lot .modal-l2-cancel {
    margin-left: 0;
}

#modal-pace-ber .l2-button,
#modal-buy-now .l2-button,
#modal-get-lot .l2-button {
    min-width: 130px;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    font-family: Tahoma, sans-serif;
    background-size: 100% 100%;
}

#win-item-auction,
#win-relist {
    width: 420px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
}

/* the link of the account to the Telegram bot */
.tg-box {
    margin: 10px 15px 0;
    padding: 10px 14px;
    background: #111;
    border: 1px solid #3e5762;
    color: #e6e6e6;
    font-size: 16px;
}

.tg-title {
    margin-right: 10px;
    font-weight: bold;
    color: #fff;
}

.tg-state {
    margin-right: 10px;
}

.tg-state.tg-on {
    color: #5fd16a;
}

.tg-state.tg-off {
    color: #b3b3b3;
}

.tg-box .tg-btn {
    width: auto;
    min-width: 130px;
    margin: 4px 0;
}

.tg-code {
    margin-top: 8px;
}

.tg-cmd {
    margin: 6px 0;
    padding: 8px 12px;
    display: inline-block;
    background: #1b1b1b;
    border: 1px dashed #3e5762;
    font-family: monospace;
    font-size: 20px;
    color: #ffd24a;
    user-select: all;
}

.tg-note {
    color: #b3b3b3;
    font-size: 14px;
}

.tg-qr {
    width: 200px;
    max-width: 100%;
    padding: 6px;
    background: #fff;
    border-radius: 6px;
}

.tg-qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.tg-box a.tg-link {
    display: block;
    margin: 8px 0;
    font-size: 18px;
    color: #5bb8ee;
    text-decoration: underline;
}

.tg-box .tg-logo {
    vertical-align: middle;
    margin-right: 4px;
}

.modal-l2-buynow-toggle {
    width: 100%;
    margin-top: 10px;
    text-align: left;
}

.modal-l2-buynow-toggle label,
#win-relist .relist-field label:has(input[type=checkbox]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #c9d4da;
    font-size: 15px;
    font-weight: normal;
}

.modal-l2-buynow-toggle input[type=checkbox],
#win-relist .relist-field label input[type=checkbox] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 22px;
    width: 22px !important;
    height: 22px !important;
    min-height: 0;
    margin: 0 10px 0 0;
    padding: 0;
    background: #0a0f18;
    border: 1px solid #b79a5b;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.modal-l2-buynow-toggle input[type=checkbox]:checked,
#win-relist .relist-field label input[type=checkbox]:checked {
    background: #1b3550;
}

.modal-l2-buynow-toggle input[type=checkbox]:checked::after,
#win-relist .relist-field label input[type=checkbox]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #e6c97a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* the withdraw and the go-to-auction buttons look like the auction buttons (blue with the gold frame) */
a.char-auction-btn,
.available-auc-btn a {
    min-width: 150px;
    height: 44px;
    line-height: 44px;
    padding: 0 22px;
    border: 0 !important;
    background: url(../img/l2/l2-button.jpg) no-repeat !important;
    background-size: 100% 100% !important;
    color: #e6d9be !important;
    font-family: Tahoma, sans-serif;
    font-size: 18px;
    font-weight: normal;
    text-align: center;
    text-transform: none;
    text-decoration: none;
}

a.char-auction-btn:hover,
a.char-auction-btn:focus,
.available-auc-btn a:hover,
.available-auc-btn a:focus {
    background-image: url(../img/l2/l2-button_hover.jpg) !important;
    color: #e6d9be !important;
}

a.char-auction-btn:active,
.available-auc-btn a:active {
    background-image: url(../img/l2/l2-button_active.jpg) !important;
}

/* the button of the item menu (inventory) is the same */
#item-actions .item-actions-el {
    border: 0;
    border-radius: 0;
    background: url(../img/l2/l2-button.jpg) no-repeat;
    background-size: 100% 100%;
    color: #e6d9be;
    font-family: Tahoma, sans-serif;
    font-size: 18px;
    font-weight: normal;
}

#item-actions .item-actions-el:hover,
#item-actions .item-actions-el:focus {
    background-image: url(../img/l2/l2-button_hover.jpg);
}

#item-actions .item-actions-el:active {
    background-image: url(../img/l2/l2-button_active.jpg);
}

/* a lot of the list whose price has just changed */
.auction-row-updated {
    box-shadow: inset 0 0 0 2px #b79a5b;
}
