/* static/css/article_bigquery_join_demo.css */
.article-bq-join {
  margin: 2.5rem 0;
}

.article-bq-join__inner {
  background: #eef6ff;
  border: 0.0625rem solid #cfe3ff;
  border-radius: 1.75rem;
  padding: 3rem 3.25rem 3.25rem;
  box-shadow: 0 1rem 2.5rem rgba(15, 80, 160, 0.08);
}

.article-bq-join__badge {
  width: fit-content;
  margin: 0 auto 1.75rem;
  padding: 0.875rem 2.625rem;
  border-radius: 62.4375rem;
  background: #1767d1;
  color: #fff;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.article-bq-join__lead {
  margin: 0 0 2rem;
  color: #17233b;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.9;
}

.article-bq-join__sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.article-bq-join__source {
  position: relative;
  min-width: 0;
  background: #fff;
  border: 0.0625rem solid #d4e5fb;
  border-radius: 1.125rem;
  padding: 1.25rem 1.375rem 1.5rem;
  box-shadow: 0 0.5rem 1.375rem rgba(15, 80, 160, 0.04);
  transition: opacity 0.3s ease;
}

.article-bq-join__source-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #17233b;
  font-size: 1.0625rem;
  font-weight: 800;
}

.article-bq-join__source-tag {
  display: inline-block;
  padding: 0.1875rem 0.625rem;
  border-radius: 999rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
}

.article-bq-join__source-tag--ga4 {
  background: #1767d1;
}

.article-bq-join__source-tag--log {
  background: #f59e0b;
}

.article-bq-join__table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.article-bq-join__table-wrap::-webkit-scrollbar {
  height: 0.5rem;
}

.article-bq-join__table-wrap::-webkit-scrollbar-thumb {
  background: #b9cdea;
  border-radius: 999rem;
}

.article-bq-join__table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.article-bq-join__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.article-bq-join__table th,
.article-bq-join__table td {
  padding: 0.5rem 0.625rem;
  border-bottom: 0.0625rem solid #e5edf7;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.article-bq-join__table th {
  background: #f4f8fd;
  color: #334155;
  font-weight: 700;
}

.article-bq-join__table tr.is-matched td {
  background: #d9f7e6;
  box-shadow: inset 0 0 0 0.0625rem #34c17a;
}

.article-bq-join__table tr.is-not-found td {
  background: #fdeeee;
}

.article-bq-join__id {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.article-bq-join__caption {
  margin: 0.875rem 0 0;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.6;
}

.article-bq-join__source.is-locked {
  opacity: 0.35;
  pointer-events: none;
}

.article-bq-join__lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-radius: 1.125rem;
  background: rgba(255, 255, 255, 0.85);
  color: #9f1d1d;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.article-bq-join__controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.article-bq-join__field {
  min-width: 0;
  background: #fff;
  border: 0.0625rem solid #d4e5fb;
  border-radius: 1.125rem;
  padding: 1.25rem 1.375rem 1.5rem;
  box-shadow: 0 0.5rem 1.375rem rgba(15, 80, 160, 0.04);
}

.article-bq-join__field label {
  display: block;
  margin-bottom: 0.875rem;
  color: #17233b;
  font-size: 1.0625rem;
  font-weight: 800;
}

.article-bq-join__field select {
  width: 100%;
  box-sizing: border-box;
  border: 0.0625rem solid #cbd8ea;
  border-radius: 0.875rem;
  background: #f8fbff;
  padding: 0.75rem 1rem;
  color: #111827;
  font-size: 1.0625rem;
  font-weight: 700;
}

.article-bq-join__mode-toggle {
  display: flex;
  gap: 0.625rem;
}

.article-bq-join__mode-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0.125rem solid #cbd8ea;
  border-radius: 0.875rem;
  padding: 0.75rem 0.5rem;
  color: #334155;
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.article-bq-join__mode-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.article-bq-join__mode-option:has(input:checked) {
  border-color: #1767d1;
  background: #eaf2ff;
  color: #1767d1;
}

.article-bq-join__button {
  display: block;
  margin: 0 auto 2rem;
  border: none;
  border-radius: 62.4375rem;
  background: #1767d1;
  color: #fff;
  font-size: 1.1875rem;
  font-weight: 700;
  padding: 0.875rem 3rem;
  cursor: pointer;
  box-shadow: 0 0.625rem 1.375rem rgba(23, 103, 209, 0.22);
}

.article-bq-join__button:hover {
  opacity: 0.9;
}

.article-bq-join__button:disabled {
  opacity: 0.6;
  cursor: default;
}

.article-bq-join__result {
  border-radius: 1.125rem;
  padding: 1.75rem 1.875rem;
  text-align: center;
  border: 0.1875rem solid transparent;
  animation: article-bq-join-result-in 0.35s ease;
}

.article-bq-join__result--unknown {
  background: #fdeeee;
  border-color: #f3c9c9;
}

.article-bq-join__result--known {
  background: #d9f7e6;
  border-color: #9ce0b8;
}

.article-bq-join__result--partial {
  background: #fffbeb;
  border-color: #fde68a;
}

.article-bq-join__result--processing {
  background: #fff;
  border-color: #d4e5fb;
}

.article-bq-join__result-icon {
  display: block;
  margin-bottom: 0.625rem;
  font-size: 2.25rem;
  line-height: 1;
}

.article-bq-join__result--processing .article-bq-join__result-icon {
  display: inline-block;
  animation: article-bq-join-spin 0.9s linear infinite;
}

.article-bq-join__result-heading {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.article-bq-join__result--unknown .article-bq-join__result-heading {
  color: #9f1d1d;
}

.article-bq-join__result--known .article-bq-join__result-heading {
  color: #0d7a33;
}

.article-bq-join__result--partial .article-bq-join__result-heading {
  color: #92650a;
}

.article-bq-join__result--processing .article-bq-join__result-heading {
  color: #17233b;
}

.article-bq-join__result-body {
  margin: 0 auto;
  max-width: 34rem;
  color: #17233b;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.8;
}

@keyframes article-bq-join-result-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes article-bq-join-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 48rem) {
  .article-bq-join__inner {
    padding: 1.75rem 1.25rem 2rem;
    border-radius: 1.375rem;
  }

  .article-bq-join__sources,
  .article-bq-join__controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-bq-join__badge {
    font-size: 1.125rem;
    padding: 0.75rem 1.75rem;
  }

  .article-bq-join__result-heading {
    font-size: 1.25rem;
  }

  .article-bq-join__result-body {
    font-size: 1rem;
  }
}
