/* Modal compartilhado de Condicoes de Acesso e identificacao de prototipo — Laboratorio IBeGI */

body.lab-gate-open {
  overflow: hidden !important;
}

.gate {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(13, 33, 41, 0.78);
  backdrop-filter: blur(2px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.gate[hidden] {
  display: none !important;
}

.gate__card {
  width: min(660px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 1.75rem;
  border-radius: 14px;
  background: #ffffff;
  color: #17262e;
  border: 1px solid #d6e0e3;
  box-shadow: 0 20px 50px rgba(11, 19, 34, 0.28);
  box-sizing: border-box;
  text-align: left;
}

.gate__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  padding: 0.26rem 0.7rem;
  border-radius: 999px;
  background: rgba(27, 116, 197, 0.1);
  color: #1B74C5;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gate h2 {
  margin: 0 0 0.75rem;
  color: #0f1a2e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
}

.gate__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: #f5f8fa;
  border: 1px solid #e2e8f0;
  font-size: 0.84rem;
  line-height: 1.4;
}

.gate__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gate__meta-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gate__meta-value {
  color: #0f1a2e;
  font-weight: 600;
}

.gate__intro {
  margin: 0 0 0.85rem;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
}

.gate__list {
  margin: 0;
  padding-left: 1.35rem;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.55;
}

.gate__list li + li {
  margin-top: 0.45rem;
}

.gate__accept {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.15rem;
  padding: 0.8rem 0.9rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f1a2e;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
}

.gate__accept input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  margin: 0.12rem 0 0;
  accent-color: #1B74C5;
  cursor: pointer;
}

.gate__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.gate__version-note {
  color: #64748b;
  font-size: 0.78rem;
}

.gate__submit {
  margin: 0;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 8px;
  background: #1B74C5;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.gate__submit:hover:not(:disabled) {
  background: #155ea3;
}

.gate__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gate__accept input[type="checkbox"]:focus-visible,
.gate__submit:focus-visible {
  outline: 2px solid #0f1a2e;
  outline-offset: 2px;
}

/* Identificacao discreta de prototipo e retorno nas ferramentas */
.lab-prototype-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin: 0 0 1.15rem;
}

.lab-return-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 26, 46, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: #0f1a2e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.lab-return-link:hover {
  border-color: #1B74C5;
  color: #1B74C5;
  background: #ffffff;
}

.lab-return-link:focus-visible {
  outline: 2px solid #1B74C5;
  outline-offset: 2px;
}

.lab-prototype-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 116, 197, 0.28);
  background: rgba(240, 247, 255, 0.94);
  color: #155ea3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-shell .masthead h1 {
  font-size: clamp(2.35rem, 5vw, 4.4rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

@media (max-width: 640px) {
  .gate {
    padding: 0.65rem;
  }

  .gate__card {
    padding: 1.25rem;
    max-height: calc(100dvh - 1.3rem);
    border-radius: 12px;
  }

  .gate h2 {
    font-size: 1.22rem;
  }

  .gate__meta {
    grid-template-columns: 1fr;
  }

  .gate__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .gate__submit {
    width: 100%;
    text-align: center;
  }
}
