/* Menu "Interno" + modal de login da intranet. Cores do site: azul #0E8CCC, verde #397509, vermelho #7B0001. */

/* celular: o menu ganhou um 6º item, então a gaveta fica 49px mais alta (era 344px / -236px) */
@media screen and (max-width: 776px) {
  .main-menu { height: 393px; bottom: -285px; }
}

.main-menu > ul > li.menu-interno > a::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 13px;
  margin-right: 6px;
  vertical-align: -1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 13'%3E%3Cpath d='M5.5 0A3.5 3.5 0 0 0 2 3.5V5H1a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H9V3.5A3.5 3.5 0 0 0 5.5 0zm0 1.5a2 2 0 0 1 2 2V5h-4V3.5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 13'%3E%3Cpath d='M5.5 0A3.5 3.5 0 0 0 2 3.5V5H1a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H9V3.5A3.5 3.5 0 0 0 5.5 0zm0 1.5a2 2 0 0 1 2 2V5h-4V3.5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.main-menu > ul > li.menu-interno > a:hover,
.main-menu > ul > li.menu-interno > a:focus-visible { color: #0E8CCC; }

html.intranet-modal-aberto,
html.intranet-modal-aberto body,
html.intranet-modal-aberto .body { overflow: hidden; }

.intranet-modal[hidden] { display: none; }
.intranet-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.intranet-modal__fundo {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .62);
  animation: intranet-aparece .2s ease-out;
}
.intranet-modal__cartao {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  color: #333;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, .35) 0 10px 40px;
  padding: 34px 30px 28px;
  text-align: center;
  animation: intranet-sobe .25s ease-out;
}
.intranet-modal__faixas {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  height: 5px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.intranet-modal__faixas i { flex: 1; }
.intranet-modal__faixas i:nth-child(1) { background: #397509; }
.intranet-modal__faixas i:nth-child(2) { background: #7B0001; }
.intranet-modal__faixas i:nth-child(3) { background: #0B6D9F; }

.intranet-modal__fechar {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  font-size: 26px;
  line-height: 36px;
  color: #888;
  cursor: pointer;
}
.intranet-modal__fechar:hover, .intranet-modal__fechar:focus-visible { background: #f0f0f0; color: #333; }

.intranet-modal__logo { width: 140px; max-width: 60%; height: auto; margin: 0 auto 10px; display: block; }
.intranet-modal__cartao h2 { font-size: 24px; font-weight: 500; color: #222; }
.intranet-modal__sub { font-size: 14px; color: #777; margin: 4px 0 22px; }

.intranet-modal__form { text-align: left; }
.intranet-modal__form label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  margin-bottom: 14px;
}
.intranet-modal__form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  font-size: 16px;               /* 16px: o iPhone não dá zoom no campo */
  color: #222;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border-color .15s, box-shadow .15s;
}
.intranet-modal__form input:focus {
  outline: none;
  border-color: #0E8CCC;
  box-shadow: 0 0 0 3px rgba(14, 140, 204, .2);
}

.intranet-modal__senha { position: relative; display: block; }
.intranet-modal__senha input { padding-right: 46px; }
.intranet-modal__olho {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 38px;
  height: 36px;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}
.intranet-modal__olho::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  background: #888;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
}
.intranet-modal__olho[aria-pressed="true"]::before { background: #0E8CCC; }
.intranet-modal__olho:focus-visible { outline: 2px solid #0E8CCC; }

.intranet-modal__entrar {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: #0E8CCC;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}
.intranet-modal__entrar:hover { background: #0B6D9F; }
.intranet-modal__entrar:focus-visible { outline: 3px solid rgba(14, 140, 204, .4); outline-offset: 2px; }
.intranet-modal__entrar:disabled { background: #8fbfd9; cursor: wait; }

.intranet-modal__erro, .intranet-modal__aviso {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.intranet-modal__erro { background: #fbeaea; color: #7B0001; border: 1px solid #e8c0c0; }
.intranet-modal__aviso { background: #fff6e0; color: #7a5a00; border: 1px solid #ecd9a6; }

@keyframes intranet-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes intranet-sobe { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .intranet-modal__fundo, .intranet-modal__cartao { animation: none; }
}
