/* Travel Connect market data embed.
   Every rule is scoped to .tc-market-embed so the host theme is untouched, and
   the legacy .tab-area / .tab-btn names are deliberately avoided. */

.tc-market-embed {
  /* 800px frame + 18px bezel on each side of .tcm-stage. */
  max-width: 836px;
  margin: 0 auto;
  padding: 0;
  color: #0f2440;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.tc-market-embed,
.tc-market-embed * {
  box-sizing: border-box;
}
/* max-width is applied to descendants only; on the root it would override the
   836px cap above and let the embed stretch to the full theme width. */
.tc-market-embed * {
  max-width: 100%;
}

/* ---- tabs ---- */
.tc-market-embed .tcm-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 16px;
  min-width: 0;
}
.tc-market-embed .tcm-tab {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #fdeadb;
  border-radius: 999px;
  background: #fdeadb;
  color: #c86a12;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.tc-market-embed .tcm-tab:hover {
  border-color: #ef8a24;
}
.tc-market-embed .tcm-tab[aria-pressed="true"] {
  background: #ef8a24;
  border-color: #ef8a24;
  color: #fff;
}
.tc-market-embed .tcm-tab:focus-visible,
.tc-market-embed .tcm-link a:focus-visible {
  outline: 2px solid #0b63d6;
  outline-offset: 2px;
}

/* ---- laptop shell ---- */
.tc-market-embed .tcm-stage {
  padding: 16px 18px 20px;
  border-radius: 14px;
  background: #23303f;
  box-shadow: 0 18px 40px -22px rgba(15, 36, 64, .55);
}
/* Hidden until the script inserts the frame, so no empty dark slab is shown. */
.tc-market-embed .tcm-stage:empty {
  display: none;
}
.tc-market-embed .tcm-frame {
  display: block;
  width: 100%;
  height: 490px;
  border: 0;
  border-radius: 4px;
  background: #fff;
}
.tc-market-embed .tcm-base {
  width: 100%;
  height: 11px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(#1b2734, #2c3a4b);
}
.tc-market-embed .tcm-stage:empty + .tcm-base {
  display: none;
}

/* ---- detail link and fallback ---- */
.tc-market-embed .tcm-link {
  margin: 20px 0 0;
  text-align: center;
}
.tc-market-embed .tcm-link a {
  color: #0b63d6;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid #dce9fb;
  padding-bottom: 2px;
}
.tc-market-embed .tcm-link a:hover {
  border-bottom-color: #0b63d6;
}
.tc-market-embed .tcm-fallback {
  margin: 0;
  padding: 16px;
  border: 1px solid #e4e9f1;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
  color: #41587a;
}

/* ---- mobile: two by two tabs, natural height, no sideways scrolling ---- */
@media (max-width: 600px) {
  .tc-market-embed .tcm-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .tc-market-embed .tcm-tab {
    min-height: 46px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .tc-market-embed .tcm-stage {
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .tc-market-embed .tcm-frame {
    height: 560px;
    /* No border here: the embedded document already draws its own frame, and a
       second one would clip 2px of the content. */
    border: 0;
    border-radius: 10px;
  }
  .tc-market-embed .tcm-base {
    display: none;
  }
}
