/* BODY sin scroll vertical */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: Arial;
}

/* Barra superior fija */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 55px;
    background: #111;
    color: #eee;
    border-bottom: 1px solid #333;
    z-index: 10;
    display: flex;
    align-items: center;
}

#top-bar .controls {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

#top-bar input,
#top-bar select,
#top-bar button {
    padding: 5px;
    background: #222;
    color: #eee;
    border: 1px solid #444;
}

.section-title {
    margin-left: 20px;
    font-weight: bold;
}

/* Contenedor del chart */
#chart-container {
    position: absolute;
    top: 55px;
    left: 0;
    width: 100%;
    height: calc(100vh - 55px);
    background: #000;
    overflow: hidden;
}

/* 🔥🔥 CANVAS OCUPA TODO EL ESPACIO 🔥🔥 */
#chart, canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Modal backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal {
    background: #222;
    color: white;
    padding: 20px;
    border: 1px solid #555;
    min-width: 300px;
}


/* ============================= */
/* Logo en top-bar (sin recuadro) */
/* ============================= */
#topbar-logo-wrap{
    margin-left: auto;      /* lo empuja al extremo derecho */
    margin-right: 15px;
    display: flex;
    align-items: center;
}

#topbar-logo-link{
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

#topbar-logo{
    width: 300px;           /* pedido: 300px */
    max-height: 34px;       /* para que no rompa la barra */
    height: auto;
    object-fit: contain;
    opacity: 0.45;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.6));
    user-select: none;
}

#topbar-logo-link:hover #topbar-logo{
    opacity: 0.75;
}


/* Util */
.hidden{ display:none !important; }


/* ============================= */
/* Autocomplete símbolos (estilo TV simple) */
/* ============================= */
.symbol-input-wrap{
    position: relative;
    display: inline-block;
}

.symbol-suggest{
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 320px;
    max-height: 320px;
    overflow-y: auto;
    background: #111;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.55);
    z-index: 9999;
}

.symbol-suggest-item{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.symbol-suggest-item:hover{
    background: rgba(255,255,255,0.06);
}

.symbol-suggest-symbol{
    font-weight: 700;
    color: #eaeaea;
}

.symbol-suggest-meta{
    font-size: 12px;
    color: #a9a9a9;
    opacity: 0.95;
    white-space: nowrap;
}

/* =============================
   DrawTools overlay + toolbar
   ============================= */
#chart-container { position: absolute; }
#chart { position: absolute; inset: 0; }
#draw-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* no molesta pan/zoom */
}
#chart-container.draw-mode #draw-overlay {
  pointer-events: auto; /* captura mouse para dibujar */
  cursor: crosshair;
}

.drawtools-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.drawtools-toolbar .dt-btn {
  background: #151515;
  color: #eaeaea;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.drawtools-toolbar .dt-btn:hover { background: #1d1d1d; }
.drawtools-toolbar .dt-btn.active {
  border-color: rgba(255,255,255,0.35);
  background: #222;
}
.drawtools-toolbar .dt-sep {
  width: 1px;
  height: 18px;
  background: #2a2a2a;
  margin: 0 6px;
}

/* Mini ticker (token + precio) */
.mini-ticker {
  margin-left: 10px;
  padding: 6px 10px;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  background: #0f0f0f;
  font-size: 12px;
  color: #eaeaea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  user-select: none;
}


/* DrawTools hint */
.dt-hint{
    font-size: 12px;
    opacity: 0.85;
    white-space: nowrap;
    margin-left: 10px;
}
