/* 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;
}

.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 {
  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__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 {
  overflow-x: auto;
}

.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__id {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.article-bq-join__note {
  margin: 0.875rem 0 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.6;
}

.article-bq-join__note--bad {
  color: #c40000;
}

.article-bq-join__note--good {
  color: #0d7a33;
}

.article-bq-join__status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 0.125rem solid #f3c9c9;
  background: #fdeeee;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.article-bq-join__status--before {
  border-color: #f3c9c9;
  background: #fdeeee;
}

.article-bq-join__status--processing {
  border-color: #fde68a;
  background: #fffbeb;
}

.article-bq-join__status--after {
  border-color: #9ce0b8;
  background: #d9f7e6;
}

.article-bq-join__status-icon {
  flex: none;
  font-size: 1.5rem;
  line-height: 1;
}

.article-bq-join__status--processing .article-bq-join__status-icon {
  animation: article-bq-join-spin 0.9s linear infinite;
}

.article-bq-join__status-text {
  color: #17233b;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.6;
}

.article-bq-join__status--before .article-bq-join__status-text {
  color: #9f1d1d;
}

.article-bq-join__status--after .article-bq-join__status-text {
  color: #0d7a33;
}

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

.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-unmatched td {
  background: #fdeeee;
}

.article-bq-join__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.article-bq-join__radio-group {
  display: flex;
  gap: 1rem;
  background: #fff;
  border: 0.0625rem solid #d4e5fb;
  border-radius: 0.875rem;
  padding: 0.625rem 1rem;
}

.article-bq-join__radio-group label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #17233b;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

.article-bq-join__button {
  border: none;
  border-radius: 62.4375rem;
  background: #1767d1;
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  padding: 0.75rem 2.25rem;
  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__arrow {
  display: block;
  margin: 0 auto 1.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border-right: 0.1875rem solid #1767d1;
  border-bottom: 0.1875rem solid #1767d1;
  transform: rotate(45deg);
  opacity: 0.7;
}

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

.article-bq-join__result-title {
  display: block;
  margin-bottom: 1rem;
  color: #17233b;
  font-size: 1.0625rem;
  font-weight: 800;
}

.article-bq-join__result-empty {
  color: #94a3b8;
  font-size: 0.9375rem;
}

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

.article-bq-join__result-table th,
.article-bq-join__result-table td {
  padding: 0.5rem 0.625rem;
  border-bottom: 0.0625rem solid #e5edf7;
  text-align: left;
  white-space: nowrap;
}

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

.article-bq-join__result-table tbody tr {
  opacity: 0;
  animation: article-bq-join-row-in 0.4s ease forwards;
}

.article-bq-join__result-table .is-null {
  color: #c40000;
  font-weight: 700;
}

.article-bq-join__narrative {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.article-bq-join__narrative li {
  position: relative;
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem 0.75rem 2.25rem;
  border-radius: 0.75rem;
  background: #f0fdf4;
  color: #17233b;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.7;
  opacity: 0;
  animation: article-bq-join-row-in 0.4s ease forwards;
}

.article-bq-join__narrative li::before {
  content: "✓";
  position: absolute;
  left: 0.875rem;
  color: #0d7a33;
  font-weight: 800;
}

.article-bq-join__narrative li.is-unmatched {
  background: #f8fafc;
  color: #64748b;
}

.article-bq-join__narrative li.is-unmatched::before {
  content: "―";
  color: #94a3b8;
}

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

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

  .article-bq-join__sources {
    grid-template-columns: 1fr;
  }

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