/* Mercado de personajes de mukorea: inc/market-page.php, inc/market-purchase.php y la ficha del plugin (view.php).
   Reemplaza a css/modulos/market.css y market-catalog.css (generados desde raven). Usa la cabecera, las pestañas
   y el aviso de tienda.css, y las ventanas, tablas y botones de ventanas.css. */

/* ---------- Cabecera y avisos ---------- */
.mk-shop-head-market { background-image: linear-gradient(90deg, #0a0705e6 0%, #0a0705b3 38%, #0a070500 62%), url(../img/shop/head-market@2x.jpg); background-size: auto, cover; background-position: 0 0, right center; }
.mk-mkt-tabs { margin-bottom: 0; }
.mk-mkt .mk-shop-notice { margin: 10px 0 0; }
.mk-mkt .mk-mkt-notice-bad { border-color: #7a2a1a; background-color: #2a0f08; color: #ffb8a8; }
.mk-mkt .mk-mkt-notice-ok { border-color: #3f6d2a; background-color: #14210d; color: #c9f2b0; }
.mk-mkt > .mk-win { margin-top: 12px; }
.mk-mkt-back { margin: 12px 0 8px; font-size: 11px; }
.mk-mkt-back a, .mk-mkt-empty a, .mk-mkt-buttons a { color: var(--ui-gold); font-weight: bold; }
.mk-mkt-more { margin: 8px 0 0; text-align: right; }
.mk-mkt-sold .mk-table td { padding: 5px 8px; }
.mk-mkt-wc { display: inline-block; width: 20px; height: 20px; vertical-align: middle; filter: drop-shadow(0 1px 2px #000); }

/* ---------- Filtros ---------- */
.mk-mkt-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin: 0 0 10px; padding: 0 0 10px; border-bottom: 1px dotted #3b2d1c; }
.mk-content .mk-mkt-filters label { display: flex; flex-direction: column; gap: 3px; margin: 0; color: var(--ui-muted); font-size: 11px; font-weight: bold; }
.mk-content .mk-mkt-filters :is(select, input) { width: 100%; height: 24px; padding: 2px 5px; border: 1px solid #4a3420; border-radius: 0; background: #0a0705; color: #f3dfb4; font: 11px Arial, sans-serif; }
.mk-content .mk-mkt-filters :is(select, input):focus { border-color: var(--ui-orange); outline: 0; }
.mk-mkt-range { display: flex; gap: 4px; }
.mk-mkt-filter-actions { display: flex; align-items: flex-end; gap: 10px; }
.mk-mkt-filter-actions a { color: var(--ui-gold); font-size: 11px; }

/* ---------- Listado (en venta y mis publicaciones) ---------- */
.mk-mkt-list { table-layout: fixed; }
.mk-content .mk-mkt-list td { padding: 4px 6px; vertical-align: middle; }
.mk-mkt-portrait img { display: block; width: 48px; height: 48px; border: 1px solid #000; outline: 1px solid #5e4526; }
.mk-mkt-name a { text-decoration: none; }
.mk-mkt-name strong { display: block; color: #fff; font-size: 12px; }
.mk-mkt-name a:hover strong { color: var(--ui-gold-hi); }
.mk-mkt-name small, .mk-mkt-price small { display: block; color: var(--ui-muted); font-size: 10px; }
.mk-mkt-price span { display: inline-flex; align-items: center; gap: 5px; }
.mk-mkt-price strong { color: var(--ui-gold-hi); font-size: 13px; }
.mk-mkt-empty { padding: 14px 0 6px; }
.mk-mkt-login { text-align: center; }
.mk-mkt-login p { margin: 0 0 10px; }
.mk-mkt-pages { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 12px 0 0; color: var(--ui-muted); font-size: 11px; }

/* ---------- Resumen de compra ---------- */
.mk-mkt-buy-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.mk-content .mk-mkt-buy-grid .mk-table td { padding: 5px 8px; vertical-align: middle; }
.mk-mkt-total td { border-top: 1px solid #5e4526; color: #fff; font-weight: bold; }
.mk-mkt-total strong { color: var(--ui-gold-hi); font-size: 14px; }
.mk-content .mk-mkt-buy-grid .mk-mkt-sub { color: var(--ui-muted); font-size: 10px; white-space: normal; }
.mk-mkt-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px dotted #3b2d1c; }
.mk-mkt-actions p, .mk-mkt-actions small { margin: 0; color: var(--ui-muted); }
.mk-content .mk-mkt-confirm { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ui-text); font-weight: normal; }
.mk-mkt-confirm strong { color: var(--ui-gold-hi); }
.mk-mkt-buttons { display: flex; align-items: center; gap: 14px; }
.mk-mkt-blockers { margin: 12px 0 0; padding: 8px 10px; border: 1px solid #7a2a1a; background: #2a0f08; color: #ffb8a8; }
.mk-mkt-blockers ul { margin: 4px 0 0; padding-left: 18px; }
.mk-mkt-reprice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.mk-content .mk-mkt-reprice label { margin: 0; color: var(--ui-muted); font-weight: bold; }
.mk-mkt-price-input { display: inline-flex; align-items: center; gap: 4px; color: var(--ui-muted); }
.mk-content .mk-mkt-price-input input, .mk-content .om-market .om-price-input input { width: 130px; height: 26px; padding: 2px 6px; border: 1px solid #4a3420; border-radius: 0; background: #0a0705; color: #f3dfb4; font: bold 12px Arial, sans-serif; }
.mk-mkt-cancel { margin: 0; }
.mk-content .mk-mkt :is(.mk-btn, .mk-cta)[disabled] { opacity: .45; cursor: default; filter: grayscale(.6); }

/* ---------- Ficha del personaje y publicación (view.php del plugin), con ventanas del template ---------- */
.mk-content .om-market { color: var(--ui-text); }
.mk-content .om-heading-mk { padding: 0 0 8px; border: 0; }
.mk-content .om-heading-mk h1 { margin: 0 0 4px; line-height: 0; }
.mk-content .om-heading-mk p { margin: 0; color: var(--ui-muted); }
.mk-content .om-market :is(.om-identity, .om-panel, .om-backpack, .om-sale-panel) {
	border: 1px solid #000; outline: 1px solid #3b2d1c; outline-offset: -2px;
	background: radial-gradient(ellipse at 50% 0%, #241a11 0%, #0f0b07 80%);
}
.mk-content .om-market .om-identity { margin-top: 10px; }
.mk-content .om-market .om-portrait { width: 60px; height: 60px; border: 1px solid #000; outline: 1px solid #5e4526; }
.mk-content .om-market .om-portrait img { object-fit: cover; }
.mk-content .om-market .om-eyebrow { color: var(--ui-gold); font-size: 11px; letter-spacing: 0; text-transform: none; }
.mk-content .om-market .om-name h2 { color: #fff; }
.mk-content .om-market .om-key-stats strong { color: var(--ui-gold-hi); }
.mk-content .om-market .om-panel-heading { margin: -10px -10px 10px; padding: 6px 10px; border-bottom: 1px solid #3b2d1c; background: linear-gradient(#2a1d10, #170f08); }
.mk-content .om-market .om-panel-title { margin: 0; line-height: 0; }
.mk-content .om-market .om-panel-title img { display: block; }
.mk-content .om-market .om-panel-heading small { color: var(--ui-muted); }
/* Atributos arriba a lo ancho; equipo e ítem lado a lado (el centro mide 684 px) */
.mk-content .om-market .om-workbench { grid-template-columns: minmax(0, 1fr) 210px; margin-top: 10px; }
.mk-content .om-market .om-attributes { grid-column: 1 / -1; }
.mk-content .om-market .om-stat-line i { background: linear-gradient(90deg, #7a4a22, #e08a2c); }
/* Tablero de equipo con las casillas del baúl original de MU */
.mk-content .om-market .om-board-wrap { max-width: 360px; }
.mk-content .om-market .om-board { padding: 0; border: 1px solid #000; outline: 1px solid #4a4a4a; background: #0b0a09 url(../img/market/warehouse_bg.gif) center / 256px auto; }
.mk-content .om-market .om-equip-slot { border: 1px solid #555; background: #0b0806 url(../img/market/warehouse_block.gif) 0 0 / 16px 16px; color: #9a9a9a; cursor: url(../img/cur2.cur), pointer; }
.mk-content .om-market .om-equip-slot:hover, .mk-content .om-market .om-equip-slot.is-selected { border-color: #d6a04c; background-color: #2a1b0c; box-shadow: inset 0 0 12px #d6a04c55; }
.mk-content .om-market .om-equip-slot img { filter: drop-shadow(0 2px 3px #000); }
.mk-content .om-market .om-slot-label { color: #8f8f8f; }
.mk-content .om-market .om-level { color: var(--ui-gold-hi); font-weight: bold; }
.mk-content .om-market .om-zen img { filter: drop-shadow(0 1px 2px #000); }
.mk-content .om-market .om-item-art { height: 110px; background: url(../img/market/warehouse_item_block.gif) center / 32px; border: 1px solid #000; outline: 1px solid #4a4a4a; }
.mk-content .om-market .om-item-art img { filter: drop-shadow(0 3px 4px #000); }
/* Personajes de la cuenta (publicar / consultar equipo) */
.mk-content .om-market .om-character-link { border: 1px solid #000; outline: 1px solid #3b2d1c; outline-offset: -2px; background: #120d08; color: #fff; text-decoration: none; }
.mk-content .om-market .om-character-link img { width: 32px; height: 32px; object-fit: cover; border: 1px solid #000; }
.mk-content .om-market .om-character-link:hover { outline-color: #8a6331; }
.mk-content .om-market .om-character-link.is-active { outline: 2px solid #d6a04c; outline-offset: -3px; background: radial-gradient(ellipse at 50% 30%, #5a3b17 0%, #1c1209 80%); }
/* Desglose de la venta en filas, como el resumen de compra (sin tarjetas) */
.mk-content .om-market .om-totals { display: block; margin: 10px 0; border-top: 1px solid #3b2d1c; }
.mk-content .om-market .om-totals > div { display: grid; grid-template-columns: 1fr auto; padding: 5px 0; border: 0; border-bottom: 1px dotted #3b2d1c; background: none; }
.mk-content .om-market .om-totals small { color: var(--ui-text); font-size: 11px; }
.mk-content .om-market .om-totals strong { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--ui-gold-hi); font-size: 13px; }
.mk-content .om-market .om-totals span { color: var(--ui-muted); font-size: 10px; }
.mk-content .om-market .om-sale-intro p { color: var(--ui-muted); }
/* Botones y controles del plugin con el bordó plano del template (.mk-btn) */
.mk-content .om-market :is(.button, .om-refresh) {
	display: inline-flex; justify-content: center; align-items: center; min-width: 80px; height: 26px; padding: 0 14px; box-sizing: border-box;
	border: 1px solid #7a4a22; border-radius: 0; background: linear-gradient(#4a1712, #2a0806); box-shadow: inset 0 1px 0 #6e2a1c, 0 1px 0 #000;
	font: bold 11px/1 Georgia, 'Times New Roman', serif; letter-spacing: .5px; color: #e9a65c; text-shadow: 1px 1px 0 #2a1204;
}
.mk-content .om-market :is(.button, .om-refresh):hover { background: linear-gradient(#5e1e16, #360b07); border-color: #b0773a; color: #fff1cf; }
.mk-content .om-market .om-publish-controls .button { height: 34px; min-width: 170px; font-size: 13px; }
.mk-content .om-market .om-backpack summary { color: var(--ui-gold-hi); font-weight: bold; }
.mk-content .om-market .om-bag-list button { border: 1px solid #000; outline: 1px solid #3b2d1c; outline-offset: -2px; background: #120d08; color: var(--ui-text); }
.mk-content .om-market .om-footnote { color: var(--ui-muted); }
/* Saldo de WC a la izquierda de la cabecera (el mercader queda a la vista a la derecha) */
.mk-shop-head-market .mk-mkt-balance { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--ui-text); }
.mk-shop-head-market .mk-mkt-balance strong { color: var(--ui-gold-hi); font-size: 13px; }
/* Publicar: aire entre las pestañas y "Tus personajes" */
.mk-mkt > .om-market { margin-top: 12px; }
