/* TLO Trust components.
   House rule from the docmaker build: every button and link this plugin styles
   sets its own color and font-family, or the theme's white button text wins and
   the control renders invisible. */

.tlo-trust-fees,
.tlo-trust-author,
.tlo-trust-badge,
.tlo-trust-bar { font-family: inherit; }

/* ------------------------------------------------------------------ fee table */

.tlo-trust-fees { margin: 2rem 0; }

.tlo-trust-fees__title { margin: 0 0 .75rem; font-size: 1.25rem; color: #1a2330; }

/* Wide tables scroll inside their own box; the page body never scrolls sideways. */
.tlo-trust-fees__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tlo-trust-fees__table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: .95rem;
  color: #1a2330;
  background: #fff;
}

.tlo-trust-fees__table th,
.tlo-trust-fees__table td {
  padding: .7rem .85rem;
  border-bottom: 1px solid #e3e8ef;
  text-align: left;
  vertical-align: top;
}

.tlo-trust-fees__table thead th {
  background: #f4f7fb;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid #d5dde8;
}

.tlo-trust-fees__name { font-weight: 600; }

.tlo-trust-fees__price {
  font-weight: 700;
  white-space: nowrap;
  color: #0b5c3f;
}

.tlo-trust-fees__price.is-quote {
  font-weight: 500;
  white-space: normal;
  color: #5a6675;
  font-style: italic;
}

.tlo-trust-fees__tiers { margin: .35rem 0 0; padding: 0; list-style: none; font-weight: 600; }
.tlo-trust-fees__tiers li { margin-top: .2rem; }
.tlo-trust-fees__tiers span { display: block; font-weight: 400; font-size: .82rem; color: #5a6675; }

.tlo-trust-fees__bundle { display: block; margin-top: .3rem; font-weight: 500; font-size: .82rem; color: #5a6675; }

.tlo-trust-fees__note { margin: .6rem 0 0; font-size: .82rem; color: #5a6675; }

.tlo-trust-fees__cta { margin: 1rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }

.tlo-trust-btn {
  display: inline-block;
  padding: .6rem 1.15rem;
  border-radius: 6px;
  background: #0b5c3f;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}
.tlo-trust-btn:hover,
.tlo-trust-btn:focus { background: #094a33; color: #fff; text-decoration: none; }

/* --------------------------------------------------------------------- badges */

.tlo-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  border: 1px solid transparent;
}

.tlo-trust-badge--vortex   { background: #eef4ff; color: #14407a; border-color: #cbdcf7; }
.tlo-trust-badge--vortex:hover,
.tlo-trust-badge--vortex:focus { background: #e2ecfd; color: #14407a; text-decoration: none; }

.tlo-trust-badge--response { background: #edf7f1; color: #0b5c3f; border-color: #c9e6d6; }

.tlo-trust-badge--rating   { background: #fff7e6; color: #7a4d00; border-color: #f2ddb0; }
.tlo-trust-badge--rating:hover,
.tlo-trust-badge--rating:focus { background: #fdefd2; color: #7a4d00; text-decoration: none; }

.tlo-trust-badge__tick  { font-weight: 700; }
.tlo-trust-badge__star  { color: #e8a800; }
.tlo-trust-badge__langs { font-weight: 500; opacity: .8; }

/* ----------------------------------------------------------------- author box */

.tlo-trust-author {
  margin: 2rem 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  background: #fafbfd;
  color: #1a2330;
}

.tlo-trust-author__person { display: flex; gap: 1rem; align-items: flex-start; }
.tlo-trust-author__person + .tlo-trust-author__person {
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e3e8ef;
}

.tlo-trust-author__photo { flex: 0 0 68px; }
.tlo-trust-author__photo img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; display: block; }

.tlo-trust-author__initials {
  display: flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; border-radius: 50%;
  background: #d9e3f0; color: #14407a;
  font-weight: 700; font-size: 1.4rem; letter-spacing: .04em;
}

.tlo-trust-author__body { flex: 1 1 auto; min-width: 0; }
.tlo-trust-author__name { margin: 0; font-weight: 700; font-size: 1.02rem; }
.tlo-trust-author__cred { margin: .15rem 0 .4rem; font-size: .85rem; color: #14407a; font-weight: 600; }
.tlo-trust-author__bio  { margin: 0; font-size: .9rem; color: #3d4757; }

.tlo-trust-author__meta {
  margin: .9rem 0 0; padding-top: .7rem; border-top: 1px solid #e3e8ef;
  font-size: .82rem; color: #5a6675;
  display: flex; flex-wrap: wrap; gap: .35rem 1.1rem;
}

/* ------------------------------------------------------- mobile contact bar */

.tlo-trust-bar { display: none; }

@media (max-width: 782px) {
  html:not(.tlo-bar-off) .tlo-trust-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 99998;               /* below tlo-chatbtns' 99999, above content */
    height: 56px;                 /* spec cap is 60px */
    align-items: stretch;
    background: #12253b;
    box-shadow: 0 -2px 10px rgba(0,0,0,.18);
  }

  /* The space is reserved by the same stylesheet that draws the bar, so the bar
     never covers content and never causes a shift after paint. */
  html:not(.tlo-bar-off) body { padding-bottom: 56px; }

  /* The theme's floating LINE/WhatsApp stack would sit on top of this bar.
     One contact affordance on mobile, not two. */
  html:not(.tlo-bar-off) .tlo-chatbtns { display: none; }

  .tlo-trust-bar__item {
    flex: 1 1 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    border-right: 1px solid rgba(255,255,255,.14);
  }
  .tlo-trust-bar__item:hover,
  .tlo-trust-bar__item:focus { color: #fff; text-decoration: none; background: rgba(255,255,255,.08); }

  .tlo-trust-bar__item--wa   { background: #1f7d4d; }
  .tlo-trust-bar__item--line { background: #1a6b4a; }
  .tlo-trust-bar__item--book { background: #0b5c3f; }

  .tlo-trust-bar__close {
    flex: 0 0 38px;
    background: transparent;
    border: 0;
    color: #fff;                  /* must be set: theme buttons default to white on white */
    font-family: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }
}

/* ------------------------------------------------------------- review router */

.tlo-trust-review { margin: 1.5rem 0; }

.tlo-trust-review__lead { font-size: 1.05rem; font-weight: 600; color: #1a2330; margin: 0 0 .9rem; }

.tlo-trust-review__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .7rem;
  margin-bottom: 1.2rem;
}

.tlo-trust-review__btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px;
  padding: .7rem 1rem;
  border: 2px solid #0b5c3f;
  border-radius: 8px;
  background: #fff;
  color: #0b5c3f;                 /* set explicitly: theme buttons default to white text */
  font-family: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.tlo-trust-review__btn:hover,
.tlo-trust-review__btn:focus { background: #0b5c3f; color: #fff; text-decoration: none; }

.tlo-trust-review__valve {
  margin: 1.2rem 0 0;
  padding: .8rem 1rem;
  border-left: 3px solid #d5dde8;
  background: #f7f9fc;
  font-size: .9rem;
  color: #3d4757;
}

/* -------------------------------------------------------------- tool cards */

.tlo-trust-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: .9rem;
  margin: 1.8rem 0;
}

.tlo-trust-tool {
  display: flex; flex-direction: column;
  padding: 1rem 1.1rem;
  border: 1px solid #e3e8ef;
  border-left: 4px solid #0b5c3f;
  border-radius: 8px;
  background: #fafbfd;
  color: #1a2330;
}

.tlo-trust-tool__title {
  margin: 0 0 .35rem;
  font-weight: 700;
  font-size: 1.02rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
}

.tlo-trust-tool__tier {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .12rem .45rem;
  border-radius: 3px;
}
.tlo-trust-tool__tier--free { background: #d9f0e3; color: #0b5c3f; }
.tlo-trust-tool__tier--gold { background: #fbeecb; color: #7a4d00; }

.tlo-trust-tool__blurb { margin: 0 0 .85rem; font-size: .9rem; color: #3d4757; flex: 1 1 auto; }

/* It is a <button>, so it must set its own colour and font or the theme wins. */
button.tlo-trust-tool__chat {
  border: 0;
  cursor: pointer;
  align-self: flex-start;
  color: #fff;
  font-family: inherit;
}

.tlo-trust-tool .tlo-trust-btn { align-self: flex-start; }

/* ------------------------------------------------------------ embed snippet */

.tlo-trust-embed { margin: 1.5rem 0; padding: .9rem 1rem; background: #f4f7fb; border-radius: 8px; }
.tlo-trust-embed__lead { margin: 0 0 .5rem; font-size: .88rem; color: #3d4757; }
.tlo-trust-embed__code {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem;
  color: #1a2330;
  background: #fff;
  border: 1px solid #d5dde8;
  border-radius: 5px;
  padding: .5rem;
  resize: vertical;
}

/* ------------------------------------------------------------------- triage */

.tlo-trust-triage {
  margin: 2rem 0;
  padding: 1.2rem 1.3rem;
  border: 1px solid #cbdcf7;
  border-radius: 10px;
  background: #f5f9ff;
  color: #1a2330;
}

.tlo-trust-triage__heading { margin: 0 0 .8rem; font-size: 1.1rem; font-weight: 700; }

.tlo-trust-triage__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: .9rem; }

/* A <button>, so it sets its own colour and font or the theme's white wins. */
button.tlo-trust-triage__free {
  border: 0;
  cursor: pointer;
  background: #14407a;
  color: #fff;
  font-family: inherit;
}
button.tlo-trust-triage__free:hover,
button.tlo-trust-triage__free:focus { background: #0f3160; color: #fff; }

.tlo-trust-triage__paid { background: #0b5c3f; }

.tlo-trust-triage__blurb { margin: 0 0 .8rem; font-size: .9rem; color: #3d4757; }
