/* Estilos do Mapa Hexagonal Interativo e Hexcrawl - Rhaokar */

/* MODAL BACKDROP FAILSAFE */
.rhaokar-modal-backdrop {
	display: none !important;
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	background: rgba(0, 0, 0, 0.85) !important;
	z-index: 999999 !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 20px !important;
	box-sizing: border-box !important;
}
.rhaokar-modal-backdrop.rhaokar-open {
	display: flex !important;
}
.rhaokar-modal-dialog {
	background: #1e2228 !important;
	color: #e0e6ed !important;
	border: 2px solid #b8860b !important;
	border-radius: 8px !important;
	max-width: 950px !important;
	width: 100% !important;
	max-height: 90vh !important;
	overflow-y: auto !important;
	padding: 20px !important;
	box-shadow: 0 15px 40px rgba(0,0,0,0.95) !important;
	position: relative !important;
}
.rhaokar-modal-header {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	border-bottom: 1px solid #3a424d !important;
	padding-bottom: 10px !important;
	margin-bottom: 15px !important;
}
.rhaokar-modal-close {
	background: none !important;
	border: none !important;
	color: #ffd700 !important;
	font-size: 1.6rem !important;
	cursor: pointer !important;
	line-height: 1 !important;
}
.rhaokar-modal-close:hover {
	color: #ff4d4f !important;
}

/* Oculta tag code durante o carregamento inicial */
#hexmap-8 code,
.rhaokar-hexmap-container code {
	opacity: 0;
	font-size: 0;
}

.rhaokar-map-outer-container {
	background: #141619;
	color: #e0e6ed;
	font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
	border: 2px solid #b8860b;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.85);
	margin-top: 20px;
	margin-bottom: 40px;
}
.rhaokar-map-main-title {
	font-family: 'Cinzel', Georgia, serif;
	color: #ffd700;
	font-weight: 700;
	font-size: 2rem;
	text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}

/* Hex Content Base */
.hexcontent {
	height: 100%;
	width: 100%;
	padding: 0;
	font-size: 14px;
	color: #000;
}
.hexcontent div {
	height: 100%;
	width: 100%;
}
.batata span {
	padding-top: 12px;
	display: block;
	font-weight: bold;
	font-size: 0.75rem;
	color: rgba(255,255,255,0.9);
	text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}
.batata {
	transition: all 0.25s ease;
	cursor: pointer;
}
.batata:hover {
	opacity: 0.8;
	filter: brightness(1.25);
	transform: scale(1.05);
}

/* Destaque de Hexágonos Mapeados no Mapa Global */
.rhaokar-mapped-hex {
	box-shadow: 0 0 12px #ffd700 !important;
	border: 2px solid #ffd700 !important;
	position: relative;
}
.rhaokar-mapped-hex::after {
	content: '📜';
	position: absolute;
	top: 2px;
	right: 4px;
	font-size: 0.8rem;
}

/* TERRENOS DO MAPA (URLs em Uploads 2026/05 com fallback local) */
/* TERRENOS DO MAPA (URLs em Uploads 2026/05 com nomes em minúsculas) */
.agua_profunda { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-aguasemfundo.gif'); background-size: cover; background-position: center; background-color: rgb(0, 50, 187); }
.agua_rasa { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-aguasemfundo.gif'); background-size: cover; background-position: center; background-color: rgb(0, 127, 212); }
.bosque { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-bosque.gif'); background-size: cover; background-position: center; background-color: rgb(86, 207, 112); }
.bosque_nevado { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-bosquenevado.gif'); background-size: cover; background-position: center; background-color: rgb(111, 177, 116); }
.floresta { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-floresta.gif'); background-size: cover; background-position: center; background-color: rgb(46, 95, 61); }
.floresta_nevada { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-florestanevada.gif'); background-size: cover; background-position: center; background-color: rgb(70, 122, 78); }
.floresta_nevada_rio { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-florestanevada.gif'); background-size: cover; background-position: center; background-color: lightskyblue; }
.floresta_nevada_trilho { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-florestanevada.gif'); background-size: cover; background-position: center; background-color: darkgrey; }
.montanha { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-montanha.gif'); background-size: cover; background-position: center; background-color: rgb(137, 199, 240); }
.montanha_nevada { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-montanhanevada.gif'); background-size: cover; background-position: center; background-color: rgb(137, 199, 240); }
.montanha_nevada_trilho { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-montanhanevada.gif'); background-size: cover; background-position: center; background-color: darkgrey; }
.planicie { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-planicie.gif'); background-size: cover; background-position: center; background-color: rgb(121, 240, 147); }
.planicie_nevada { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-planicienevada.gif'); background-size: cover; background-position: center; background-color: rgb(169, 202, 171); }
.planicie_nevada_trilho { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-planicienevada.gif'); background-size: cover; background-position: center; background-color: darkgrey; }
.deserto { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-deserto.gif'); background-size: cover; background-position: center; background-color: rgb(247, 255, 212); }
.selva { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-selva.gif'); background-size: cover; background-position: center; background-color: rgb(6, 158, 74); }
.montanha_com_floresta { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-montanhafloresta.gif'); background-size: cover; background-position: center; background-color: rgb(137, 199, 240); }
.montanha_com_floresta_nevada { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-montanhaflorestanevada.gif'); background-size: cover; background-position: center; background-color: rgb(137, 199, 240); }
.montanha_com_selva { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-montanhaselva.gif'); background-size: cover; background-position: center; background-color: rgb(137, 199, 240); }
.pantano { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-pantano.gif'); background-size: cover; background-position: center; background-color: rgb(76, 116, 82); }
.vulcao { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-vulcao.gif'); background-size: cover; background-position: center; background-color: rgb(137, 199, 240); }
.mana_wastes { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/tile-ermosdemana.gif'); background-size: cover; background-position: center; background-color: rgb(67, 74, 78); }

/* REINOS E ESTRUTURAS */
.voldheimr { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/voldheimr.png'); background-size: cover; background-position: center; }
.skigir { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/skigir.png'); background-size: cover; background-position: center; }
.aetheomir { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/aetheomir.png'); background-size: cover; background-position: center; }
.catarna { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/catarna.png'); background-size: cover; background-position: center; }
.cordilheiras_vermelhas, .cordileiras_vermelhas { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/cordilheiras_vermelhas.png'); background-size: cover; background-position: center; }
.demios { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/demios.png'); background-size: cover; background-position: center; }
.galorfindil { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/galorfindil.png'); background-size: cover; background-position: center; }
.gliorith { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/gliorith.png'); background-size: cover; background-position: center; }
.huntston { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/huntston.png'); background-size: cover; background-position: center; }
.kaareth { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/kaareth.png'); background-size: cover; background-position: center; }
.koba { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/koba.png'); background-size: cover; background-position: center; }
.mao_do_aqueronte { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/mao_do_aqueronte.png'); background-size: cover; background-position: center; }
.montanha_de_ferro { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/montanha_de_ferro.png'); background-size: cover; background-position: center; }
.montanha_de_mithral { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/montanha_de_mithral.png'); background-size: cover; background-position: center; }
.orcshardhaven { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/orcshardhaven.png'); background-size: cover; background-position: center; }
.shogunato { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/shogunato.png'); background-size: cover; background-position: center; }

/* CIDADES E ESTRUTURAS URBANAS */
.capital { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/capital.png'); background-size: cover; background-position: center; }
.capital_nevada { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/capital_nevada.png'); background-size: cover; background-position: center; }
.hamlet { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/hamlet.png'); background-size: cover; background-position: center; }
.hamlet_snow { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/hamlet_snow.png'); background-size: cover; background-position: center; }
.large_city { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/large_city.png'); background-size: cover; background-position: center; }
.large_city_snow { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/large_city_snow.png'); background-size: cover; background-position: center; }
.large_town { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/large_town.png'); background-size: cover; background-position: center; }
.large_town_snow { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/large_town_snow.png'); background-size: cover; background-position: center; }
.metropolis { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/metropolis.png'); background-size: cover; background-position: center; }
.metropolis_snow { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/metropolis_snow.png'); background-size: cover; background-position: center; }
.military_fort { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/military_fort.png'); background-size: cover; background-position: center; }
.mine { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/mine.png'); background-size: cover; background-position: center; }
.oasis { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/oasis.png'); background-size: cover; background-position: center; }
.ruin { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/ruin.png'); background-size: cover; background-position: center; }
.ruin_large { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/ruin_large.png'); background-size: cover; background-position: center; }
.small_city { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/small_city.png'); background-size: cover; background-position: center; }
.small_city_snow { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/small_city_snow.png'); background-size: cover; background-position: center; }
.small_town { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/small_town.png'); background-size: cover; background-position: center; }
.small_town_snow { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/small_town_snow.png'); background-size: cover; background-position: center; }
.thorp { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/thorp.png'); background-size: cover; background-position: center; }
.thorp_snow { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/thorp_snow.png'); background-size: cover; background-position: center; }
.village { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/village.png'); background-size: cover; background-position: center; }
.village_snow { background-image: url('https://rhaokar.com.br/wp-content/uploads/2026/05/village_snow.png'); background-size: cover; background-position: center; }

/* MODAL DE SUB-HEXÁGONOS */
#rhaokar-subtile-grid-container {
	padding: 10px 4px;
	overflow-x: auto;
	max-width: 100%;
	box-sizing: border-box;
}
.subtile-grid-row {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
	margin-bottom: -12px;
}
.subtile-hex-item {
	width: 52px;
	height: 60px;
	flex-shrink: 0;
	aspect-ratio: 52 / 60;
	clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 0.72rem;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0,0,0,0.9);
	cursor: pointer;
	transition: all 0.2s ease;
	border: 1px solid rgba(255,215,0,0.4);
}
.subtile-hex-item:hover, .subtile-hex-item.selected-subtile {
	transform: scale(1.15);
	z-index: 10;
	box-shadow: 0 0 10px #ffd700;
	border: 2px solid #ffd700;
}

/* RESPONSIVO PARA SMARTPHONES E TABLETS */
@media (max-width: 576px) {
	.subtile-grid-row {
		gap: 2px;
		margin-bottom: -9px;
	}
	.subtile-hex-item {
		width: 38px;
		height: 44px;
		font-size: 0.58rem;
	}
}

@media (max-width: 380px) {
	.subtile-grid-row {
		gap: 1px;
		margin-bottom: -7px;
	}
	.subtile-hex-item {
		width: 33px;
		height: 38px;
		font-size: 0.5rem;
	}
}

/* RHAOKAR MAP VIEWPORT & CANVAS STYLES */
.rhaokar-map-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #191c21;
	padding: 8px 14px;
	border-bottom: 1px solid #3a424d;
	border-radius: 6px 6px 0 0;
	flex-wrap: wrap;
}
.rhaokar-map-btn {
	background: #2b313a;
	color: #ffd700;
	border: 1px solid #b8860b;
	border-radius: 4px;
	padding: 4px 12px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}
.rhaokar-map-btn:hover {
	background: #b8860b;
	color: #111;
}
.rhaokar-map-hint {
	margin-left: auto;
	font-size: 0.8rem;
	color: #a0aec0;
}

#rhaokar-hex-viewport {
	width: 100%;
	height: 650px;
	position: relative;
	overflow: hidden;
	background: #0b0d10;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	border-radius: 0 0 6px 6px;
}
#rhaokar-hex-viewport.is-dragging {
	cursor: grabbing !important;
}

#rhaokar-hex-canvas {
	position: absolute;
	top: 0;
	left: 0;
	transform-origin: 0 0;
	will-change: transform;
}

/* MACRO HEXAGON TILES */
.rhaokar-macro-hex {
	position: absolute;
	width: 56px;
	height: 64.66px;
	clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	background-color: #1b263b;
	border: 1px solid rgba(255, 255, 255, 0.15);
}
.rhaokar-macro-hex span {
	font-size: 0.65rem;
	font-weight: 800;
	color: #ffffff;
	text-shadow: 0 1px 3px rgba(0,0,0,0.95), 0 0 5px rgba(0,0,0,0.9);
	pointer-events: none;
}
.rhaokar-macro-hex:hover {
	z-index: 50 !important;
	filter: brightness(1.35) drop-shadow(0 0 8px #ffd700);
}

.rhaokar-macro-hex.rhaokar-mapped-hex {
	filter: drop-shadow(0 0 6px #ffd700);
	border: 1px solid #ffd700;
}
.rhaokar-hex-mapped-badge {
	position: absolute;
	top: 4px;
	right: 4px;
	font-size: 0.75rem;
	pointer-events: none;
}
