/* Fable ESCROW - step "Pickup and delivery" (publish form) and box on the
   listing page. Checkboxes use the theme standard .fable-check
   (themes/fable/css/checkbox.css); colours follow the publish switches
   (.fp-switch) and the listing page tokens (--fiv1-*). */

/* ---------- publish form ---------- */

/* The theme floats .fp-help (float:left; width:100%) and every form label
   (.item.item-post .form-horizontal label: float:left; width:100%;
   padding-top:16px; bold). A flex list next to the floated help would be
   squeezed into the leftover width, so clear it and reset the labels. */
.fp-publish .fesc-opts,
.fp-publish .fesc-note {
  clear: both;
}
.item.item-post .fp-publish .fesc-opts label {
  float: none;
  width: auto;
  margin: 0;
  padding-top: 0;
  text-align: left;
  font-weight: normal;
  line-height: 1.35;
}
.item-post .fp-publish .fesc-opts select,
.item-post .fp-publish .fesc-opts input[type="text"] {
  margin-bottom: 0;
}

.fp-publish .fesc-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.fp-publish .fesc-opt {
  box-sizing: border-box;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f4f5f7;
  transition: background .15s, border-color .15s;
}
.fp-publish .fesc-opt:has(> .fesc-main input:checked) {
  border-color: #a9d5c7;
  background: #eef7f3;
}
.item.item-post .fp-publish .fesc-opts .fable-check.fesc-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin: 0;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.fp-publish .fesc-sub {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 16px 30px;
}
.fp-publish .fesc-sub[hidden],
.fp-publish .fesc-price[hidden] {
  display: none;
}
.fp-publish .fesc-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.item.item-post .fp-publish .fesc-opts .fesc-sub-label {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #5f6670;
}
.fp-publish .fesc-select {
  width: 100%;
  max-width: 260px;
}
.fp-publish .fesc-seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fp-publish .fesc-radio {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.fp-publish .fesc-radio input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.fp-publish .fesc-radio span {
  display: inline-block;
  padding: 9px 16px;
  border: 1.5px solid #c4c7cc;
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  line-height: 1.2;
}
.fp-publish .fesc-radio input:checked + span {
  border-color: #111;
  background: #111;
  color: #fff;
}
.fp-publish .fesc-radio input:focus-visible + span {
  outline: 2px solid #111;
  outline-offset: 2px;
}
.fp-publish .fesc-pay {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fp-publish .fesc-pay .fable-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  cursor: pointer;
}
.fp-publish .fesc-price-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.item-post .fp-publish .fesc-price-field input[type="text"] {
  width: 110px;
}
.fp-publish .fesc-cur {
  color: #5f6670;
}

/* ---------- shared: disclaimer ---------- */

.fesc-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b6b6b;
}
.fesc-note .fesc-ico {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

/* ---------- listing page ---------- */

.fesc-box {
  margin: 0 0 22px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--fiv1-chip, #f6f6f6);
  color: var(--fiv1-ink, #111);
}
.fesc-box-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}
.fesc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fesc-li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}
.fesc-li .fesc-ico {
  flex-shrink: 0;
  margin-top: 1px;
}
.fesc-li-text {
  min-width: 0;
}
.fesc-li-sub {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--fiv1-muted, #6b6b6b);
}
.fesc-tip {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.45;
}
.fesc-box .fesc-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--fiv1-line, #e3e3e3);
  color: var(--fiv1-muted, #6b6b6b);
}

/* ---------- dark mode ---------- */

html[data-theme="dark"] .fp-publish .fesc-opt {
  background: var(--fd-surface-2, #22262b);
}
html[data-theme="dark"] .fp-publish .fesc-opt:has(> .fesc-main input:checked) {
  border-color: #2f5d50;
  background: #1c2f2a;
}
html[data-theme="dark"] .item.item-post .fp-publish .fesc-opts .fesc-sub-label,
html[data-theme="dark"] .fp-publish .fesc-cur,
html[data-theme="dark"] .fesc-note {
  color: var(--fd-text-muted, #a6adb6);
}
html[data-theme="dark"] .fp-publish .fesc-radio span {
  border-color: var(--fd-border, #2f353c);
  background: transparent;
}
html[data-theme="dark"] .fp-publish .fesc-radio input:checked + span {
  border-color: #f2f2f2;
  background: #f2f2f2;
  color: #111;
}
html[data-theme="dark"] .fp-publish .fesc-radio input:focus-visible + span {
  outline-color: #f2f2f2;
}
html[data-theme="dark"] .fesc-box .fesc-note {
  color: var(--fiv1-muted, #a5a5a5);
}
html[data-theme="dark"] .fesc-box {
  background: var(--fiv1-chip, #26272b);
  color: var(--fiv1-ink, #f2f2f2);
}
html[data-theme="dark"] .fesc-box .fesc-li-sub {
  color: var(--fiv1-muted, #a5a5a5);
}

/* hint under a sub-option label (distance of personal delivery) */
.fp-publish .fesc-hint {
  margin: -2px 0 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b6b6b;
}
html[data-theme="dark"] .fp-publish .fesc-hint {
  color: var(--fd-text-muted, #a6adb6);
}

/* ---------- listing page: disclaimer as a tooltip on the (i) icon ---------- */

.fesc-box-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.fesc-box-head .fesc-box-title {
  margin: 0;
}
.fesc-info-wrap {
  position: relative;
  flex-shrink: 0;
}
.fesc-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fiv1-muted, #6b6b6b);
  cursor: pointer;
}
.fesc-info:hover,
.fesc-info:focus-visible,
.fesc-info-wrap.is-open .fesc-info {
  color: var(--fiv1-ink, #111);
}
.fesc-info:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}
.fesc-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: -6px;
  z-index: 30;
  width: 280px;
  max-width: calc(100vw - 48px);
  padding: 10px 12px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: normal;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
  pointer-events: none;
}
@media (hover: hover) {
  .fesc-info-wrap:hover .fesc-pop {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}
.fesc-info:focus-visible + .fesc-pop,
.fesc-info-wrap.is-open .fesc-pop {
  opacity: 1;
  visibility: visible;
  transform: none;
}
html[data-theme="dark"] .fesc-pop {
  background: #f2f2f2;
  color: #111;
}

/* ---------- listing page: title + detail lines (1.0.4) ---------- */

.fesc-list {
  gap: 14px;
}
.fesc-li .fesc-ico {
  margin-top: 2px;
}
.fesc-li-title {
  display: block;
  font-weight: 500;
}
.fesc-li-sub {
  margin-top: 1px;
  line-height: 1.4;
  text-wrap: pretty;
}
.fesc-tip {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--fiv1-line, #e3e3e3);
  font-size: 13px;
  color: var(--fiv1-muted, #6b6b6b);
  text-wrap: pretty;
}
html[data-theme="dark"] .fesc-tip {
  border-top-color: var(--fiv1-line, #3a3b3f);
  color: var(--fiv1-muted, #a5a5a5);
}

/* ---------- listing page: rows with separators, large centred icon (1.0.5) ---------- */

.fesc-list {
  gap: 0;
}
.fesc-li {
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.fesc-li:first-child {
  padding-top: 4px;
}
.fesc-li:last-child {
  padding-bottom: 0;
}
.fesc-li + .fesc-li {
  border-top: 1px solid var(--fiv1-line, #e3e3e3);
}
.fesc-li .fesc-ico {
  width: 30px;
  height: 30px;
  margin-top: 0;
  stroke-width: 1.5;
}
html[data-theme="dark"] .fesc-li + .fesc-li {
  border-top-color: var(--fiv1-line, #3a3b3f);
}
