/*
 * Sizes for inline SVG icons that the T4.6 stylesheet does not cover; without these
 * the browser draws them at their default (very large) size.
 */
.heroItem.empty > svg {
    display: block;
    width: 60%;
    height: 60%;
    max-width: 48px;
    max-height: 48px;
    margin: 20% auto 0;
    opacity: .35;
}

button.download > svg,
.textButtonV2.download > svg {
    width: 18px;
    height: 18px;
}

.walkingCalculationWrapper .title > svg {
    width: 12px;
    height: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

/* report header: the template draws the outcome icons as <img>, the T4.6 stylesheet only sizes <svg> */
#reportWrapper .body .role .header .outcome{position:relative}
#reportWrapper .body .role .header .outcome>img{position:absolute}
#reportWrapper .body .role .header .outcome>img.losses{right:15px;bottom:-3px;width:48px;height:60px}
#reportWrapper .body .role .header .outcome>img.loot,#reportWrapper .body .role .header .outcome>img.skull{right:2px;bottom:2px;width:26px;height:32px}
.rtl #reportWrapper .body .role .header .outcome>img{transform:scale(-1,1)}

/* profile: the chosen hero portrait (254x330 source) shown at card size */
img.heroImage.profilePortrait{width:160px;height:208px;object-fit:cover;border-radius:6px;border:2px solid #c9b48a;box-shadow:0 2px 6px rgba(0,0,0,.25);background:#efe3cc}

/* quick gold upgrade: one row of target buttons under a small title */
.upgradeToLevelGroup{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:6px}
.upgradeToLevelGroup .upgradeToLevelTitle{width:100%;text-align:center;font-weight:bold;font-size:12px;color:#5d4a2b}
.upgradeToLevelGroup button.upgradeToLevel{margin:0}
/* MOJAN WAR logo in the top bar (replaces the Travian logo) */
#topBar #logo{display:flex;align-items:center;justify-content:center;gap:6px;text-decoration:none}
#topBar #logo .mojanCrest{width:24px;height:27px}
#topBar #logo .mojanName{font:700 13px/1 'Times New Roman',serif;letter-spacing:.06em;color:#5c3a17;white-space:nowrap}
/* quest window buttons were all absolutely placed at the same spot (Skip covered Continue): lay them out in a row */
.questWrapper .questButtons{display:flex;flex-wrap:wrap;gap:10px;height:auto;justify-content:flex-end}
.questWrapper .questButtons button{position:static}
/* the mentor stands on the top edge of the task box instead of sinking into it */
#sidebarBoxQuestmaster .header #questmasterButton{margin-bottom:0;position:relative;z-index:2}
#sidebarBoxQuestmaster > .content{margin-top:32px !important}
/* daily quests box: its title and subtitle now sit inside the framed box */
#sidebarBoxDailyquests .dailyQuestsHead{margin:0 0 8px;text-align:start}
#sidebarBoxDailyquests .dailyQuestsHead .travianBirthdayRibbon,#sidebarBoxDailyquests .dailyQuestsHead .headline{position:static;width:auto;height:auto;background:none;margin:0;padding:0}
#sidebarBoxDailyquests .dailyQuestsHead .headline{font-weight:bold;font-size:14px;color:#3b2a1a}
#sidebarBoxDailyquests .dailyQuestsHead .boxTitle{font-size:12px;color:#6b5a48;padding:0;margin:2px 0 0}

/* Farm list header: name on one side, count / details / edit / delete on the other, no overlap */
.listEntry .round.listTitle{display:flex;align-items:center;justify-content:space-between;gap:10px;height:auto;min-height:34px;padding:6px 12px;background:linear-gradient(#efe6d2,#ddcfae);border:1px solid #c9b48a;border-radius:8px;margin-bottom:6px}
.listEntry .listTitle .listTitleText{order:1;flex:1;min-width:0;float:none;margin:0;font-weight:bold;font-size:13px;color:#3f2e19;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:static}
.listEntry .listTitle .raidListTitleButtons{order:2;display:flex;align-items:center;gap:6px;float:none;margin:0;position:static}
.listEntry .listTitle .raidListTitleButtons > *{float:none !important;margin:0 !important;position:static}
.listEntry .listTitle .raidListSlotCount{order:-1;direction:ltr;background:#5a4630;color:#f4e7c9;border-radius:10px;padding:2px 9px;font-size:11px;font-weight:bold}
.listEntry .listTitle .raidListSwitchWrapper .openedClosedSwitch{position:static;margin:0;white-space:nowrap}
.listEntry .listTitle #deleteRaidList,.listEntry .listTitle #updateRaidList{width:26px;height:26px;border-radius:6px;border:1px solid #8a6a3a;background:#fff8ea;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center}
.listEntry .listTitle #deleteRaidList img,.listEntry .listTitle #updateRaidList img{display:none}
.listEntry .listTitle #deleteRaidList::before{content:"\2715";color:#b23a2a;font-size:13px;font-weight:bold}
.listEntry .listTitle #updateRaidList::before{content:"\270E";color:#5a4630;font-size:14px}
.listEntry .listTitle #deleteRaidList:hover{background:#fbe1dc}
.listEntry .listTitle #updateRaidList:hover{background:#f3e5c4}
/* Wonder of the World: its picture hung below the village (base past the wall); stand it on the village centre */
#villageContent .buildingSlot.g40 img.building{transform:translate(37px,-130px) scale(.85);transform-origin:50% 92%}
#villageContent .buildingSlot.g40 .level.ww{transform:translate(125px,-33px)}
/* the Wonder stays behind the other buildings so none of them is hidden by it */
#villageContent .buildingSlot.g40{z-index:10 !important}
body.rtl #villageContent .buildingSlot.g40 img.building{transform:translate(-67px,-130px) scale(.85)}
body.rtl #villageContent .buildingSlot.g40 .level.ww{transform:translate(-152px,-33px)}

/* "make this tab my favourite": the empty copy in the page frame (hero, adventures…) does nothing, so only
   the buttons of pages with tabs (alliance, messages, reports, marketplace…) stay, next to the info button */
#tabFavorButton:not([onclick]){display:none !important}
.contentTitle #tabFavorButton[onclick]{margin:0 4px !important;position:static !important}
/* chart dates "03.11." keep their dots at the end in Arabic pages */
table.barChart tr:first-child td{direction:ltr}
/* map tile window (village, oasis, empty land): parchment card in the game's brown and gold instead of plain white */
.dialogWrapper[data-context=map] .dialog,.dialogWrapper:has(#tileDetails) .dialog{background:linear-gradient(#f7efdd,#efe2c6) !important;border:3px solid #7a5a36 !important;border-radius:10px !important;box-shadow:0 0 0 2px #c9a45c,0 12px 30px rgba(30,18,6,.55) !important;overflow:hidden}
.dialogWrapper:has(#tileDetails) .dialogContainer,.dialogWrapper:has(#tileDetails) .dialogContents,.dialogWrapper:has(#tileDetails) #dialogContent{background:transparent !important}
#tileDetails{color:#3d2b1a}
#tileDetails>h1{margin:0 0 12px !important;padding:8px 40px 8px 12px !important;border-radius:6px;line-height:20px !important;height:auto !important;background:linear-gradient(#6e5032,#4a3320);color:#f6e7c4 !important;font-size:15px !important;border-bottom:2px solid #c9a45c;text-shadow:0 1px 1px #000}
body.rtl #tileDetails>h1{padding:8px 12px 8px 40px !important}
#tileDetails>h1 .coordinates{color:#f0cf7a}
.dialogWrapper:has(#tileDetails) .dialogCancelButton{z-index:3}
#tileDetails .detailImage{box-sizing:border-box;border:2px solid #b89062;border-radius:8px;overflow:hidden;box-shadow:0 2px 6px rgba(60,40,20,.3)}
#tileDetails .detailImage .options{box-sizing:border-box;background:linear-gradient(#f3e6c9,#e8d6b0);border-top:1px solid #b89062;padding:8px 10px !important}
#tileDetails .detailImage .option{padding:2px 0}
#tileDetails .option a,#tileDetails a.arrow{color:#5f7d1e !important;font-weight:bold}
#tileDetails .option a:hover,#tileDetails a.arrow:hover{color:#3c5410 !important}
#tileDetails .option .disabled{color:#9a8a72 !important}
#tileDetails #map_details h4{margin:0 0 6px !important;padding:4px 8px;background:#e3cfa6;border-inline-start:4px solid #7a5a36;border-radius:4px;color:#4a3320;font-size:12px;text-transform:capitalize}
#tileDetails #map_details table.transparent{background:rgba(255,255,255,.45) !important;border:1px solid #d7c19a !important;border-radius:6px;margin-bottom:10px !important;border-collapse:separate}
#tileDetails #map_details table.transparent td{border:0 !important;background:transparent !important;padding:3px 6px !important}
#tileDetails #map_details td.val{font-weight:bold;color:#4a3320}
#tileDetails .instantTabs .tabContainer{background:rgba(255,255,255,.5);border:1px solid #d7c19a;border-top:0;border-radius:0 0 6px 6px;padding:8px}
#tileDetails .instantTabs .tabContainer td{color:#6b5640}
#tileDetails #map_details{box-sizing:border-box}
/* two columns that never wrap: picture + actions | details (the old floats dropped the details under the picture) */
#tileDetails{display:grid !important;grid-template-columns:minmax(0,1fr) minmax(0,220px);column-gap:14px;align-items:start}
#tileDetails>h1{grid-column:1/-1}
#tileDetails>.detailImage,#tileDetails>#map_details{float:none !important;width:auto !important;margin:0 !important}
#tileDetails>.clear,#tileDetails>h1 .clear{display:none}
#tileDetails .detailImage img,#tileDetails .detailImage .image{max-width:100%}
