/* Index — portal de rastreamento (mobile-first) */
@import "portal-bars.css";

body.idx-portal {
  background: #f3f4f6;
  min-height: 100vh;
}

body.idx-portal #acessibilidade,
body.idx-portal #acess-drop-down {
  display: none;
}

.idx-top {
  display: block;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
}

.idx-top-logo {
  display: flex;
  justify-content: center;
  padding: 0.85rem 1rem 0.65rem;
}

.idx-top-logo img {
  height: 2rem;
  width: auto;
}

.idx-main {
  padding: 1.25rem 0.85rem 1.5rem;
}

.idx-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.idx-hero {
  text-align: center;
  margin-bottom: 1.15rem;
}

.idx-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #003157;
  line-height: 1.25;
}

.idx-hero p {
  margin: 0;
  font-size: 0.88rem;
  color: #5b7a95;
  font-weight: 500;
}

.idx-alerta {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  border-left: 4px solid #d32f2f;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.idx-alerta-ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d32f2f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.idx-alerta strong {
  display: block;
  color: #c62828;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.idx-alerta p {
  margin: 0;
  color: #b71c1c;
  font-size: 0.78rem;
  line-height: 1.45;
}

.idx-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 49, 87, 0.08);
  padding: 1.15rem 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.idx-card-lead {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: #1565c0;
  font-weight: 600;
}

.idx-card-lead--caminhao {
  gap: 0.55rem;
  color: #003157;
}

.idx-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #003157;
  margin-bottom: 0.55rem;
}

.idx-input-wrap {
  position: relative;
  margin-bottom: 0.35rem;
}

.idx-input {
  width: 100%;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #003157;
  background: #fff;
  margin-bottom: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.idx-input-check {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
}

.idx-input.valid {
  border-color: #2e7d32;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.12);
}

.idx-input.valid + .idx-input-check {
  display: flex;
}

.idx-ok {
  display: none;
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  color: #2e7d32;
  font-weight: 600;
}

.idx-ok.show {
  display: block;
}

.idx-input::placeholder {
  color: #90a4ae;
}

.idx-input:focus {
  outline: none;
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

.idx-input.error {
  border-color: #d32f2f;
}

.idx-erro {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: #c62828;
  min-height: 0;
  display: none;
}

.idx-erro.show {
  display: block;
}

.idx-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: inherit;
  cursor: pointer;
  background: #5a6578;
  color: #fff;
  box-shadow: 0 3px 10px rgba(90, 101, 120, 0.35);
  transition: background 0.15s;
}

.idx-btn:hover:not(:disabled) {
  background: #4a5568;
}

.idx-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.idx-btn--ready {
  background: #2e7d32;
  box-shadow: 0 3px 12px rgba(46, 125, 50, 0.35);
}

.idx-btn--ready:hover:not(:disabled) {
  background: #1b5e20;
}

.idx-btn--cta {
  background: #2e7d32;
  box-shadow: 0 3px 12px rgba(46, 125, 50, 0.35);
  margin-top: 0.25rem;
}

.idx-btn--cta:hover:not(:disabled) {
  background: #1b5e20;
}

body.idx-modal-open {
  overflow: hidden;
}

.idx-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.idx-overlay[hidden] {
  display: none !important;
}

.idx-modal {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  padding: 1.25rem 1.15rem 1.15rem;
  max-height: 90vh;
  overflow-y: auto;
}

.idx-modal[hidden] {
  display: none !important;
}

.idx-modal-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e3f2fd;
  color: #1565c0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.65rem;
}

.idx-modal-ico--rf {
  background: #e8eaf6;
  color: #003157;
}

.idx-modal-title {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1.35;
  color: #003157;
}

.idx-steps {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
}

.idx-step {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.65rem;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
}

.idx-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
  box-sizing: border-box;
}

.idx-step.active {
  color: #003157;
  font-weight: 600;
}

.idx-step.active::before {
  border-color: #1565c0;
  border-top-color: transparent;
  animation: idx-step-spin 0.8s linear infinite;
}

.idx-step.done {
  color: #2e7d32;
}

.idx-step.done::before {
  border-color: #2e7d32;
  background: #2e7d32 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/10px no-repeat;
}

@keyframes idx-step-spin {
  to {
    transform: rotate(360deg);
  }
}

.idx-progress {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.idx-progress span {
  display: block;
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, #003157, #1565c0);
  border-radius: inherit;
  transition: width 0.45s ease;
}

.idx-result-meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.idx-result-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.78rem;
  color: #475569;
  margin-bottom: 0;
}

.idx-result-meta strong {
  color: #003157;
}

.idx-result-alert {
  background: #fdecea;
  border-left: 4px solid #d32f2f;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.85rem;
}

.idx-result-alert-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #c62828;
  letter-spacing: 0.02em;
}

.idx-result-alert ul {
  margin: 0;
  padding-left: 1rem;
  color: #b71c1c;
  font-size: 0.72rem;
  line-height: 1.45;
}

.idx-result-foot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.65rem;
  color: #607d8b;
}

.idx-result-foot span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.idx-result-foot svg {
  color: #1565c0;
}

.idx-trust {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.idx-trust li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: #607d8b;
  margin-top: 0.35rem;
}

.idx-trust svg {
  color: #1565c0;
  flex-shrink: 0;
}

.idx-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.idx-feature {
  background: #fff;
  border-radius: 14px;
  padding: 0.85rem 0.5rem 0.95rem;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 49, 87, 0.08);
  border: 1px solid #eef2f6;
  border-left-width: 5px;
  border-left-style: solid;
  border-left-color: #003157;
}

.idx-feature--blue {
  border-left-color: #003157;
}

.idx-feature--blue .idx-feature-ico {
  background: transparent;
  color: #003157;
  padding: 0;
  width: auto;
  height: auto;
}

.idx-feature-ico--caminhao {
  margin-bottom: 0.15rem;
}

.idx-feature--green {
  border-left-color: #28a745;
}

.idx-feature--green .idx-feature-ico {
  background: #e8f5ec;
  color: #28a745;
}

.idx-feature--yellow {
  border-left-color: #ffc107;
}

.idx-feature--yellow .idx-feature-ico {
  background: #fff8e1;
  color: #e6a800;
}

.idx-feature-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin-bottom: 0.45rem;
}

.idx-feature h2 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #003157;
  line-height: 1.2;
}

.idx-feature p {
  margin: 0;
  font-size: 0.58rem;
  line-height: 1.4;
  color: #003157;
  font-weight: 500;
}

.idx-rodape {
  background: url("../images/bg-amarelo.svg") #ffdf00 no-repeat center bottom;
  background-size: 100% auto;
  padding: 1.5rem 1rem 1.25rem;
  margin-top: 0.5rem;
}

.idx-rodape-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.idx-rodape-correios {
  height: 2rem;
  width: auto;
}

.idx-rodape-copy {
  margin: 0;
  text-align: center;
  font-size: 0.65rem;
  color: #003157;
  line-height: 1.4;
}

@media (max-width: 420px) {
  .idx-features {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .idx-feature {
    display: flex;
    text-align: left;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.75rem;
  }

  .idx-feature-ico {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .idx-feature h2 {
    font-size: 0.82rem;
  }

  .idx-feature p {
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .idx-main {
    padding-left: max(0.65rem, env(safe-area-inset-left));
    padding-right: max(0.65rem, env(safe-area-inset-right));
  }

  .idx-overlay {
    padding: 0.65rem;
  }

  .idx-modal {
    padding: 1rem;
    max-height: min(85vh, 640px);
  }

  .idx-hero h1 {
    font-size: 1.2rem;
  }
}

.idx-result-meta {
  flex-wrap: wrap;
  align-items: flex-start;
}

.idx-result-meta span,
.idx-result-meta strong {
  min-width: 0;
  flex: 1 1 8rem;
}

.idx-result-meta strong {
  text-align: right;
  overflow-wrap: anywhere;
}

@media (max-width: 360px) {
  .idx-result-meta strong {
    flex-basis: 100%;
    text-align: left;
  }
}

@media (min-width: 768px) {
  .idx-wrap {
    max-width: 520px;
  }

  .idx-hero h1 {
    font-size: 1.65rem;
  }

  .idx-feature p {
    font-size: 0.68rem;
  }

  .idx-feature h2 {
    font-size: 0.85rem;
  }

  .idx-feature-ico {
    width: 50px;
    height: 50px;
  }
}

@media (min-width: 1024px) {
  .idx-wrap {
    max-width: 560px;
  }
}
