/* Additions for the relaunch: login box, City Hall, market, chat, visit bar.
   Everything else comes from the original gamev4.css. */

.hudbuttons { display: none; float: left; clear: left; }
.hudbuttons .followButton { margin-top: 27px; }
.citypanel { color: #c4ebfd; }

.loginbox { width: 300px !important; z-index: 20; text-align: center; padding: 20px 26px 34px; }
.loginbox .loginlogo { width: 200px; margin: -70px auto 6px; display: block; }
.loginbox h2 { font-size: 18px; margin-bottom: 12px; }
.loginbox input { width: 100%; margin: 5px 0; padding: 6px 10px; border: 3px solid #b6a695; outline: none; color: #594c3d; }
.loginbox input:focus { border-color: #89b74c; }
.loginbox .researchButton, .loginbox .followButton { float: none; left: 0; width: 100%; margin: 20px 0 0; }
.loginbox .researchButton { padding: 12px; }
#loginmsg { min-height: 18px; margin: 4px 0 0; color: #c0392b; font-size: 13px; }

/* the original panel scrolled as a whole and clipped its own title ribbon; pin it below the ribbon instead */
.featured_modal { top: 105px !important; transform: none !important; overflow: visible !important; max-height: none !important;
    width: calc(100% - 40px); padding: 30px 30px 24px !important; }
.panelscroll { max-height: calc(100vh - 270px); min-height: 100px; overflow-y: auto; overflow-x: hidden; padding: 0 10px 10px; }
.panelscroll::after { content: ""; display: block; clear: both; }
.featured_modal__header p { font-weight: bold; }
.featured_modal__image img { max-height: 200px; }
.awesome { padding: 10px; }
.invtable { margin: 0 auto 10px; font-size: 14px; color: #594c3d; }
.invtable td, .invtable th { vertical-align: middle; }
.invtable a, .packcard a, .hallnav a, .chatform a { color: #476323; font-weight: bold; text-decoration: none; }
.invtable a:hover, .packcard a:hover, .hallnav a:hover { text-decoration: underline; }
.matbadge { display: inline-block; min-width: 22px; padding: 0 4px; margin-right: 4px; border-radius: 4px;
    color: #fff; font-size: 11px; font-weight: bold; text-align: center; line-height: 18px; }
.packcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; font-size: 13px; }
.packcard img { height: 90px; max-width: 120px; object-fit: contain; }
.packcard small { color: #8a7a68; min-height: 54px; }

.hallnav { justify-content: center; gap: 18px; margin-top: 8px; }
.hallnav a.active { text-decoration: underline; }
.chatbox { height: 260px; overflow-y: auto; text-align: left; border: 3px solid #efedea; padding: 8px; margin-bottom: 8px; }
.chatline { padding: 3px 0; border-bottom: 1px solid #f3f0ec; word-wrap: break-word; }
.chatline small { float: right; color: #b6a695; }
.chatform { display: flex; gap: 10px; align-items: center; }
.chatform input { flex: 1; padding: 6px 10px; border: 3px solid #b6a695; outline: none; }

.visitbar { display: none; position: absolute; top: 100px; left: 50%; transform: translateX(-50%); z-index: 5;
    background: #fff; padding: 12px 20px; box-shadow: 0 0 0 6px #b6a695, 9px 9px rgba(0,0,0,.1); }
.visitbar a { margin-left: 14px; color: #476323; font-weight: bold; }

.lot { filter: grayscale(.55); }
.lot:hover { filter: none; opacity: .9; }

@media (max-width: 700px) {
    .pen { width: calc(100% - 140px); left: 70px; right: auto; }
    .name_modal, .intro_modal { width: calc(100% - 30px); }
    .featured_modal { width: calc(100% - 30px); padding: 20px 16px 50px; }
    .featured_modal__image { float: none; margin: 0 auto; }
}

/* Bottom dock with the city's services, like the original (Hospital, Shop, Refinery, Bank, Market) */
.dock { display: none; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 6;
    background: rgba(255,255,255,.55); border-radius: 18px 18px 0 0; padding: 6px 14px 0; white-space: nowrap; }
.dockbtn { display: inline-block; width: 92px; text-align: center; cursor: pointer; position: relative; transition: transform .15s; }
.dockbtn:hover { transform: translateY(-4px); }
.dockbtn img { height: 62px; max-width: 88px; object-fit: contain; }
.dockbtn span { position: absolute; left: 0; right: 0; bottom: 4px; color: #fff; font-weight: bold;
    text-shadow: 0 0 3px #000, 1px 1px 0 #000; font-size: 13px; }

.mystats_js .swatch { background: #e5c62f; }
.itemicon { vertical-align: middle; object-fit: contain; }
.invgrid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 14px; }
.invcell { width: 112px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px;
    border: 3px solid #efedea; font-size: 12px; }
.invcell img { height: 44px; }
.invcell b { font-size: 16px; }
.invcell a { color: #476323; font-weight: bold; text-decoration: none; }
.sectiontitle { font-size: 15px; margin: 12px 0 2px; color: #8a7a68; }
.buildopts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.buildopt { width: 250px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border: 3px solid #efedea; }
.buildopt > img { height: 100px; object-fit: contain; }
.buildopt .awesome { margin-top: 10px; }
.costline { font-size: 12px; min-height: 64px; }
.costitem { display: inline-block; white-space: nowrap; margin: 2px 4px; }
.houseinfo { text-align: left; display: inline-block; }
.houseinfo p { margin: 4px 0; }
.upline { margin: 18px 0 2px; clear: both; }
.refinery td { vertical-align: middle; text-align: center; }
.recipehead { text-align: center; color: #8a7a68; }
.craftbtn.disabled { opacity: .4; }
.sellform { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.sellform select, .sellform input { border: 3px solid #b6a695; padding: 4px 6px; max-width: 200px; }
.sellform input { width: 100px; }
.sellform a { color: #476323; font-weight: bold; }
.featured_modal .awesome { margin: 14px auto 4px; }
@media (max-width: 700px) { .dockbtn { width: 62px; } .dockbtn img { height: 44px; } .dockbtn span { font-size: 10px; } }

/* Map sprites use Bootstrap's .btn for tooltips; never show its grey background, padding or focus ring */
.itemmap, .itemmapstatic, .itemmap:hover, .itemmapstatic:hover, .itemmap:focus, .itemmapstatic:focus,
.itemmap:active, .itemmapstatic:active, .itemmap:focus-visible, .itemmapstatic:focus-visible {
    padding: 0 !important; background: transparent !important; border-color: transparent !important; box-shadow: none !important;
}
.itemmapstatic { cursor: default; }
.itemmap:hover { filter: brightness(1.08); }

/* Exchange (RSC deposit / withdraw) */
.hudbuttons .exchangepanel, .hudbuttons .referralpanel { display: block; }

/* Referral */
.refpanel { text-align: center; }
.refpanel .refpack { font-size: 18px; font-weight: bold; }
.refpanel #reflink { width: 100%; max-width: 440px; border: 3px solid #b6a695; padding: 4px 8px; text-align: center; font-size: 13px; }
.refpanel .refcopy { margin: 26px 0 18px; }
.refpanel table { max-width: 320px; margin: 0 auto; }
.exchange-cols { text-align: center; margin-bottom: 10px; }
.exchange-cols input { width: 180px; border: 3px solid #b6a695; padding: 4px 8px; text-align: center; }
.exchange-cols small { display: block; color: #8a7a68; }
.exchange-cols .awesome { margin: 12px auto 6px; }
.featured_modal code { font-size: 11px; color: #594c3d; word-break: break-all; }

/* Wallet sign-in panel */
#gameblack { z-index: 30; }
.walletlogin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 440px; max-width: calc(100% - 24px);
    background: #143f5d; border: 3px solid #4fd1e8; border-radius: 10px; padding: 16px 18px 12px; text-align: center;
    box-shadow: 0 0 0 4px #0d2a3f, 0 18px 40px rgba(0,0,0,.45); font-family: monospace; }
.wl-title { text-align: left; color: #4fd1e8; font-size: 18px; font-weight: bold; letter-spacing: 1px; margin-bottom: 10px; }
.wl-banner { position: relative; border: 2px solid #4fd1e8; border-radius: 6px; overflow: hidden; }
.wl-banner img { display: block; width: 100%; }
.wl-banner .wl-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 62%; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.wl-text { color: #c5e6ee; font-size: 13px; margin: 14px 4px; line-height: 1.5; }
.wl-btn { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 10px; padding: 11px 16px; border: 2px solid #ff9324;
    border-radius: 6px; background: linear-gradient(#1f5b82, #174a6b); color: #fff; font: bold 15px monospace; letter-spacing: 1px;
    text-transform: uppercase; cursor: pointer; box-shadow: 0 3px 0 #0d2a3f; }
.wl-btn:hover { background: linear-gradient(#2a6f9b, #1d5a80); }
.wl-btn:active { transform: translateY(2px); box-shadow: none; }
.wl-btn:disabled { opacity: .6; cursor: wait; }
.wl-btn img { width: 30px; height: 30px; border-radius: 6px; }
#loginmsg { color: #ff9a8a; min-height: 18px; margin: 4px 0 0; font-size: 12px; }

/* Wallet panel */
.walletaddr { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 18px; }
.walletaddr img { width: 30px; height: 30px; }
.walletaddr small { color: #8a7a68; font-size: 12px; }
.walletcols { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 14px; }
.walletbox { flex: 1 1 260px; max-width: 380px; border: 3px solid #efedea; padding: 12px; text-align: center; }
.walletbox h4 { font-size: 17px; margin-bottom: 8px; }
.walletbox input { width: 180px; border: 3px solid #b6a695; padding: 4px 8px; text-align: center; }
.walletnote { font-size: 12px; color: #8a7a68; margin: 6px 0; }
