/* ================================================================
   FOOTER MARESOL - Barra inferior com cotações, calendário, etc
   ================================================================ */
:root {
  --primary: #00ff88;
  --bg-footer: #0a0a0a;
  --bg-modal: #ffffff;
  --text-dark: #222222;
  --btn-gray: #dddddd;
  --item-bg: #eeeeee;
  --danger: #ff0000;
  --up: #00aa55;
  --down: #ff0000;
}

/* ═══ BARRA INFERIOR ═══ */
#footer-maresol {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    height: 45px;
    border-top: 1px solid #9E9E9E;
    z-index: 999998;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-family: 'Segoe UI', Roboto, sans-serif;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    transform: translateY(100%);
}
#footer-maresol.active { transform: translateY(0); }

#btn-reabrir {
    position: fixed;
    bottom: 0;
    right: 20px;
    background: #ffffff;
    border: 1px solid #607D8B;
    border-bottom: none;
    color: #060606;
    width: 45px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px 8px 0 0;
    z-index: 999999;
    cursor: pointer;
}

.aba-likes {
    position: absolute;
    top: -35px;
    left: 20px;
    background: #303F9F;
    border: 1px solid #9E9E9E;
    border-bottom: none;
    color: #ffffff;
    height: 35px;
    padding: 0 12px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
}

.abas-direita {
  position: absolute;
  top: -35px;
  right: 20px;
  display: flex;
  gap: 5px;
}
.aba-item {
    background: #ffffffa6;
    border: 1px solid #607D8B;
    border-bottom: none;
    color: #080808;
    width: 45px;
    height: 35px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* ═══ CENTRO ═══ */
.conjunto-central {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #000000;
  font-size: 20px;
  white-space: nowrap;
}


.divisor { color: #444; font-size: 14px; margin: 0 2px; }
.item-info { display: flex; align-items: center; gap: 5px; color: #000; font-size: 20px; }
.val-destaque {
    color: #000000;
    font-family: monospace;
    font-weight: bold;
    font-size: 20px;
}

/* ═══ MODAIS ═══ */
.modal-m {
  display: none;
  position: fixed;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-modal);
  border: 2px solid #bbb;
  border-radius: 15px;
  padding: 18px;
  z-index: 1000000;
  box-shadow: 0 15px 50px rgba(0,0,0,0.3);
  color: var(--text-dark);
  max-height: 400px;
  overflow-y: auto;
  width: 280px;
}

#m-cotacoes { width: 340px; }
#m-agenda { width: 300px; }
#m-menu { width: 280px; }
#m-calc { width: 280px; }

.btn-x {
  position: sticky;
  top: 0;
  float: right;
  background: var(--danger);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  z-index: 10;
  margin-bottom: -20px;
}

.menu-link {
  display: block;
  color: var(--text-dark);
  text-decoration: none;
  padding: 10px;
  background: var(--item-bg);
  margin-bottom: 5px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid #ccc;
  font-weight: 500;
}

/* ═══ CALENDÁRIO ═══ */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-weekday { font-size: 10px; color: #008844; font-weight: bold; text-align: center; }
.cal-num {
  padding: 5px;
  font-size: 11px;
  border-radius: 4px;
  text-align: center;
  background: #f0f0f0;
  border: 1px solid #ddd;
  color: #111;
  font-weight: 600;
  position: relative;
}
.cal-num.hoje { background: #00ff88; color: #000; border-color: #008844; font-weight: 900; }
.cal-num.feriado { background: #ffe0e0; color: #cc0000; border-color: #ff0000; font-weight: 900; }
.cal-num.feriado.hoje { background: #ff4444; color: #fff; border-color: #cc0000; }

/* ═══ CALCULADORA ═══ */
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-btn {
  background: var(--btn-gray);
  border: 1px solid #bbb;
  color: #000;
  padding: 12px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
#c-disp {
  width: 100%;
  background: #eee;
  color: #000;
  border: 2px solid #bbb;
  padding: 10px;
  text-align: right;
  margin: 10px 0;
  font-size: 22px;
  border-radius: 5px;
  font-family: monospace;
  box-sizing: border-box;
}

/* ═══ COTAÇÕES ═══ */
.cot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 4px;
  background: #f8f8f8;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  font-size: 12px;
}
.cot-nome { font-weight: 700; color: #333; min-width: 80px; }
.cot-valor { font-family: monospace; font-weight: 900; font-size: 14px; }
.cot-var { font-weight: 900; font-size: 11px; min-width: 60px; text-align: right; }
.cot-up { color: var(--up); }
.cot-down { color: var(--down); }
.cot-hora { font-size: 9px; color: #999; text-align: center; margin-top: 8px; }
.cot-loading { text-align: center; color: #999; font-size: 11px; padding: 20px; }

.cot-tabs { display: flex; gap: 5px; margin-bottom: 10px; flex-wrap: wrap; justify-content: center; }
.cot-tab {
  padding: 5px 12px;
  border-radius: 15px;
  border: 1px solid #ccc;
  background: #f0f0f0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  transition: 0.2s;
}
.cot-tab.active { background: #00ff88; border-color: #008844; color: #000; }

/* Mobile */
@media (max-width: 480px) {
  .modal-m {
    width: 90vw !important;
    max-width: 340px;
  }
  #m-cotacoes { width: 90vw !important; max-width: 340px; }
  #m-agenda { width: 90vw !important; max-width: 300px; }
}

/* Ajusta o site principal pra não cobrir o conteúdo */
body { padding-bottom: 50px; }