/* Comparison tables */
figure.aiw-comparison-table,
.aiw-assist-rich-tables figure.aiw-comparison-table {
  margin: 1.5rem 0;
}

figure.aiw-comparison-table figcaption,
.aiw-assist-rich-tables figure.aiw-comparison-table figcaption {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.aiw-comparison-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

figure.aiw-comparison-table table,
.aiw-assist-rich-tables figure.aiw-comparison-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

figure.aiw-comparison-table[data-kind="hotel"] .aiw-comparison-table__col-family,
.aiw-assist-rich-tables figure.aiw-comparison-table[data-kind="hotel"] .aiw-comparison-table__col-family {
  min-width: 10rem;
  white-space: normal;
  line-height: 1.5;
}

.aiw-assist-rich-tables figure.aiw-comparison-table th,
.aiw-assist-rich-tables figure.aiw-comparison-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.aiw-assist-table-style-modern figure.aiw-comparison-table thead th {
  background: #eff6ff;
  color: #1e3a8a;
}

.aiw-assist-table-style-minimal figure.aiw-comparison-table thead th {
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
}

.aiw-assist-table-style-feminine figure.aiw-comparison-table thead th {
  background: #fdf2f8;
  color: #9d174d;
}

.aiw-assist-table-style-earth figure.aiw-comparison-table thead th {
  background: #f5f0e8;
  color: #78350f;
}

.aiw-assist-table-image-column figure.aiw-comparison-table td:first-child,
.aiw-assist-table-image-column figure.aiw-comparison-table th:first-child {
  min-width: 120px;
}

.aiw-assist-table-mobile-scroll figure.aiw-comparison-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.aiw-assist-table-mobile-scroll figure.aiw-comparison-table table {
  min-width: 640px;
}

.aiw-assist-table-mobile-scroll figure.aiw-comparison-table th:first-child,
.aiw-assist-table-mobile-scroll figure.aiw-comparison-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 2px 0 0 #e2e8f0;
}

@media (max-width: 768px) {
  .aiw-assist-table-mobile-scroll .entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
}

/* Travel hotel image + table card */
figure.aiw-hotel-image,
.aiw-assist-rich-tables figure.aiw-hotel-image {
  margin: 1em auto;
  text-align: center;
}

figure.aiw-hotel-image img,
.aiw-assist-rich-tables figure.aiw-hotel-image img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

figure.aiw-hotel-image--small,
.aiw-assist-rich-tables figure.aiw-hotel-image--small {
  max-width: 360px;
}

figure.aiw-hotel-image--small img,
.aiw-assist-rich-tables figure.aiw-hotel-image--small img {
  max-width: min(100%, 360px);
  width: auto;
  height: auto;
  object-fit: contain;
}

figure.aiw-hotel-image--needs-review,
.aiw-assist-rich-tables figure.aiw-hotel-image--needs-review {
  max-width: 100%;
}

figure.aiw-hotel-image--needs-review img,
.aiw-assist-rich-tables figure.aiw-hotel-image--needs-review img {
  max-width: min(100%, 640px);
  width: auto;
  height: auto;
  object-fit: contain;
}

figure.aiw-hotel-image figcaption,
.aiw-assist-rich-tables figure.aiw-hotel-image figcaption {
  margin-top: 0.35em;
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
}

figure.rakuten-info-card.wp-block-table,
.aiw-assist-rich-tables figure.rakuten-info-card.wp-block-table {
  max-width: 720px;
  margin: 1.25em auto;
  width: 100%;
}

figure.rakuten-info-card table,
.aiw-assist-rich-tables figure.rakuten-info-card table {
  width: 100%;
  border-collapse: collapse;
}

figure.rakuten-info-card .aiw-card-row > th,
.aiw-assist-rich-tables figure.rakuten-info-card .aiw-card-row > th {
  width: 26%;
  min-width: 6.5em;
  vertical-align: top;
  font-weight: 600;
  color: #334155;
  padding: 10px 12px;
  word-break: keep-all;
}

figure.rakuten-info-card .aiw-card-row > td,
.aiw-assist-rich-tables figure.rakuten-info-card .aiw-card-row > td {
  vertical-align: top;
  padding: 10px 12px;
  color: #1e293b;
  line-height: 1.6;
  word-break: break-word;
}

figure.rakuten-info-card .aiw-card-product-name,
.aiw-assist-rich-tables figure.rakuten-info-card .aiw-card-product-name {
  font-weight: 700;
}

figure.rakuten-info-card .aiw-rating-chip,
.aiw-assist-rich-tables figure.rakuten-info-card .aiw-rating-chip {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: #f1f5f9;
  color: #334155;
}

figure.rakuten-info-card .aiw-rating-chip--strong,
.aiw-assist-rich-tables figure.rakuten-info-card .aiw-rating-chip--strong {
  background: #d1fae5;
  color: #065f46;
}

figure.rakuten-info-card .aiw-rating-chip--good,
.aiw-assist-rich-tables figure.rakuten-info-card .aiw-rating-chip--good {
  background: #ecfdf5;
  color: #047857;
}

figure.rakuten-info-card .aiw-review-count,
.aiw-assist-rich-tables figure.rakuten-info-card .aiw-review-count {
  display: inline-block;
  margin-left: 0.35em;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: #fef3c7;
  color: #92400e;
}

figure.rakuten-info-card .aiw-card-row--booking a,
.aiw-assist-rich-tables figure.rakuten-info-card .aiw-card-row--booking a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #bf0000 !important;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 3px 8px rgba(191, 0, 0, 0.22);
}

figure.rakuten-info-card figcaption.aiw-card-credit,
.aiw-assist-rich-tables figure.rakuten-info-card figcaption.aiw-card-credit {
  margin-top: 4px;
  text-align: right;
  color: #94a3b8;
  font-size: 0.72rem;
}

.aiw-hotel-card__notice,
.aiw-assist-rich-tables .aiw-hotel-card__notice {
  max-width: 720px;
  margin: 0.75em auto 1.25em;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #92400e;
}

figure.rakuten-info-map,
.aiw-assist-rich-tables figure.rakuten-info-map {
  max-width: 720px;
  margin: 1.25em auto;
  text-align: center;
}

figure.rakuten-info-map .wp-block-embed__wrapper,
figure.rakuten-info-map .aiw-map-embed-wrapper,
.aiw-assist-rich-tables figure.rakuten-info-map .wp-block-embed__wrapper,
.aiw-assist-rich-tables figure.rakuten-info-map .aiw-map-embed-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 240px;
  max-height: 360px;
  overflow: hidden;
  border-radius: 10px;
  background: #e5e7eb;
  margin: 0 auto;
}

figure.rakuten-info-map iframe,
figure.rakuten-info-map .aiw-map-iframe,
.aiw-assist-rich-tables figure.rakuten-info-map iframe,
.aiw-assist-rich-tables figure.rakuten-info-map .aiw-map-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

figure.rakuten-info-map .aiw-map-fallback-link,
.aiw-assist-rich-tables figure.rakuten-info-map .aiw-map-fallback-link {
  margin: 0.5em 0 0;
  font-size: 0.85rem;
  text-align: right;
}

figure.rakuten-info-map .aiw-map-fallback-link a,
.aiw-assist-rich-tables figure.rakuten-info-map .aiw-map-fallback-link a {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Mini CTA */
.aiw-mini-cta {
  margin: 1rem 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.aiw-mini-cta--hotel {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.aiw-mini-cta__link {
  color: #1d4ed8 !important;
  font-weight: 700;
  text-decoration: none;
}

.aiw-mini-cta--hotel .aiw-mini-cta__link::before {
  content: "→ ";
}

.aiw-assist-mini-cta-button .aiw-mini-cta a,
.aiw-assist-mini-cta-button .aiw-mini-cta__button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.aiw-assist-mini-cta-text .aiw-mini-cta a {
  color: #2563eb !important;
  font-weight: 700;
  text-decoration: underline;
  background: transparent;
  padding: 0;
}

.aiw-product-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin: 1rem 0;
}