/* Página do editor do mapa - só overrides do layout.
   O "look" principal vem do /css/style.css do site */

.metin-page {
  /* deixa o theme do site mandar (bg, fonts, etc) */
}

.metin-container {
  width: 100%;
}

/* Painel do formulário (topo) */
.metin-form-wrapper {
  width: 100%;
  margin-bottom: 1px;
}

.metin-panel {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* LAYOUT MAPA + TXT */
.map-row {
  gap: 5px;
  align-items: flex-start;
}

.map-col {
  min-width: 0;
}

/* O mapa “abraça” a imagem e serve de canvas para overlays */
#pointer_div.map-wrap {
  position: relative;
  display: inline-block;
  cursor: crosshair;
}

/* Imagem responsiva (mantém proporção) */
#map_img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* TXT panel */
.txt-panel {
  width: 1000px;
  max-width: 100%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.txt-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 2px;
}

.txt-editor-wrap {
  height: 785px; /* ajusta se quiseres mais alto */
}

/* CodeMirror ocupa o painel */
.txt-panel .CodeMirror {
  width: 100% !important;
  height: 100% !important;
}

/* Overlays */
.metin {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: auto;
  cursor: move;
}

.metin-raio {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.6);
  z-index: 2;
  pointer-events: none;
}

.metin.m { background: #ff4444; }
.metin.r { background: #44ff44; }
.metin.g { background: #4488ff; }

.metin-raio.m { border-color: rgba(255,70,70,.6); }
.metin-raio.r { border-color: rgba(70,255,70,.6); }
.metin-raio.g { border-color: rgba(70,120,255,.6); }

/* Mobile: empilha */
@media (max-width: 991.98px) {
  .txt-panel {
    width: 100%;
  }
  .txt-editor-wrap {
    height: 360px;
  }
}
/* Nome do TXT mais estreito */
.metin-form-wrapper .txt-name{
  width: 180px !important;   /* ajusta: 160/200/220 */
  min-width: 140px;
}

/* Botão ao lado não “estica” */
.metin-form-wrapper .txt-clear-btn{
  white-space: nowrap;
  padding: 5px 10px;
}
.metin-form-wrapper .txt-clear-btn{
  margin-left: 8px; /* ajusta */
  white-space: nowrap;
}
.metin-form-row{
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 10px;
}

.txt-name{ width: 180px; }   /* stone.txt mais estreito */
.w-tipo{ width: 100px; height:40px; }
.w-codigo{ width: 140px; }
.w-num{ width: 90px; }
.w-file{ width: 300px; }


@media (max-width: 991px){
  .metin-form-row{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
/* MUITO importante em layouts flex: permite encolher sem criar overflow */
.txt-col,
.txt-panel,
.txt-editor-wrap,
.CodeMirror {
  min-width: 0;
}
/* garante que o CodeMirror não cria largura extra */
.txt-editor-wrap {
  width: 100%;
  overflow: hidden;
}

.CodeMirror {
  width: 100% !important;
  max-width: 100% !important;
}
.metin-container,
.map-row {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}
