/*
  Temple Foot Sanctuary Gift Card Demo
  File: /assets/css/tfs/tfs-gift-card-v8.css
  Accent teal: #00798d
  Notes:
  - All custom selectors are prefixed with tfs- to avoid conflicts.
  - PDF generation later should use *prt.jpg files only.
*/

:root {
  --tfs-gift-teal: #00798d;
  --tfs-gift-teal-dark: #005d6d;
  --tfs-gift-card-ratio: 5 / 7;
  --tfs-gift-muted-border: rgba(127, 127, 127, 0.24);
  --tfs-gift-soft-bg: rgba(127, 127, 127, 0.08);
}

.tfs-gift-card-section {
  position: relative;
}

.tfs-gift-kicker {
  color: var(--tfs-gift-teal);
  letter-spacing: 0.04em;
}

.tfs-gift-step-card,
.tfs-gift-summary-card {
  border: 0;
  border-radius: 1rem;
  background: var(--bs-body-bg);
}

.tfs-gift-helper {
  color: var(--bs-secondary-color);
  font-size: 0.95rem;
}

.tfs-gift-accordion .accordion-button {
  gap: 0.4rem;
}

.tfs-gift-accordion .tfs-gift-date {
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
  font-weight: 400;
  margin-left: 0.35rem;
}

.tfs-gift-loading {
  min-height: 150px;
  display: grid;
  place-items: center;
  color: var(--bs-secondary-color);
}

.tfs-gift-slider .splide__slide {
  padding: 0.25rem;
}

.tfs-gift-bg-choice {
  display: block;
  position: relative;
  border-radius: 0.85rem;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  background: var(--tfs-gift-soft-bg);
  transition: border-color 180ms ease, transform 180ms ease;
}

.tfs-gift-bg-choice img {
  display: block;
  width: 100%;
  height: auto;
}

.tfs-gift-bg-choice:hover {
  transform: translateY(-2px);
}

.tfs-gift-bg-choice.tfs-selected {
  border-color: var(--tfs-gift-teal);
  box-shadow: 0 0 0 0.25rem rgba(0, 121, 141, 0.16);
}

.tfs-gift-bg-choice.tfs-selected::after {
  content: "✓ Selected";
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  background: var(--tfs-gift-teal);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.tfs-gift-preview-wrap {
  max-width: 430px;
  margin-inline: auto;
}

.tfs-gift-preview-card {
  aspect-ratio: var(--tfs-gift-card-ratio);
  border-radius: 0.65rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tfs-gift-muted-border);
  box-shadow: 0 0.75rem 2.5rem rgba(0,0,0,0.16);
  color: #212529;
  display: flex;
  flex-direction: column;
  font-family: var(--bs-body-font-family);
}

.tfs-gift-preview-topbar,
.tfs-gift-preview-bottombar {
  background: var(--tfs-gift-teal);
  height: 7%;
  flex: 0 0 auto;
}

.tfs-gift-preview-header {
  padding: 0.55rem 0.75rem 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: Marcellus, Georgia, serif;
  font-size: clamp(0.72rem, 2.2vw, 0.9rem);
  line-height: 1.1;
}

.tfs-gift-preview-id {
  color: #707070;
  font-size: 0.72em;
  text-align: right;
}

.tfs-gift-preview-names {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.15rem 0.75rem 0.45rem;
}

.tfs-gift-preview-face {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--tfs-gift-teal);
}

.tfs-gift-preview-name-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.35rem;
  align-items: baseline;
  font-family: Marcellus, Georgia, serif;
  line-height: 1.15;
  font-size: clamp(0.8rem, 2.5vw, 1.02rem);
}

.tfs-gift-preview-label {
  color: var(--tfs-gift-teal);
  font-weight: 700;
}

.tfs-gift-preview-message {
  background: var(--tfs-gift-teal);
  color: #fff;
  text-align: center;
  padding: 0.45rem 0.55rem;
  font-family: Marcellus, Georgia, serif;
  font-size: clamp(0.78rem, 2.35vw, 1rem);
  line-height: 1.15;
  min-height: 2.2rem;
  display: grid;
  place-items: center;
}

.tfs-gift-preview-image {
  width: 100%;
  display: block;
  aspect-ratio: 534 / 274;
  object-fit: cover;
  background: #e8e8e8;
}

.tfs-gift-preview-body {
  flex: 1 1 auto;
  padding: 0.65rem 0.75rem 0.5rem;
  font-size: clamp(0.61rem, 1.8vw, 0.78rem);
  line-height: 1.26;
}

.tfs-gift-preview-body p {
  margin-bottom: 0.35rem;
}

.tfs-gift-preview-body .tfs-teal-text {
  color: var(--tfs-gift-teal);
  font-weight: 700;
}

.tfs-gift-preview-fade {
  animation: tfsGiftFade 220ms ease-in-out;
}

@keyframes tfsGiftFade {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.tfs-gift-value-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 992px) {
  .tfs-gift-value-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tfs-gift-value-option {
  border: 1px solid var(--tfs-gift-muted-border);
  border-radius: 0.85rem;
  padding: 1rem;
  background: var(--bs-body-bg);
}

.tfs-gift-total-box {
  border-left: 4px solid var(--tfs-gift-teal);
  background: var(--tfs-gift-soft-bg);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
}

.tfs-gift-mail-fields {
  display: none;
}

.tfs-gift-mail-fields.tfs-active {
  display: block;
}

.tfs-gift-envelope {
  max-width: 360px;
  width: 100%;
  border-radius: 0.75rem;
}

.tfs-gift-order-item {
  border: 1px solid var(--tfs-gift-muted-border);
  border-radius: 1rem;
  padding: 1rem;
  background: var(--bs-body-bg);
  height: 100%;
}

.tfs-gift-order-thumb {
  width: 100%;
  max-width: 160px;
  border-radius: 0.5rem;
  border: 1px solid var(--tfs-gift-muted-border);
}

.tfs-gift-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 78px;
  white-space: nowrap;
  text-align: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgba(0, 121, 141, 0.12);
  color: var(--tfs-gift-teal);
  font-weight: 700;
  font-size: 0.82rem;
}

.tfs-gift-char-good { color: var(--bs-secondary-color); }
.tfs-gift-char-warn { color: #b46900; }
.tfs-gift-char-bad { color: #b00020; font-weight: 700; }

.tfs-gift-required-note {
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}

.tfs-gift-section-anchor {
  scroll-margin-top: 110px;
}

/* --- TFS Gift Card Demo Polish Pass 1 --- */
:root {
  --tfs-preview-top-bar-height: 3.5%;
  --tfs-preview-bottom-bar-height: 3.5%;
  --tfs-preview-message-size: clamp(0.68rem, 2.05vw, 0.86rem);
}

.tfs-gift-preview-topbar { height: var(--tfs-preview-top-bar-height); }
.tfs-gift-preview-bottombar { height: var(--tfs-preview-bottom-bar-height); }
.tfs-gift-preview-message { font-size: var(--tfs-preview-message-size); padding: 0.35rem 0.45rem; }

.tfs-face-upload-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin: 0;
}

.tfs-face-upload-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.42);
  color: #fff;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.tfs-face-upload-wrap:hover .tfs-face-upload-overlay,
.tfs-face-upload-wrap:focus-within .tfs-face-upload-overlay {
  opacity: 1;
}

.tfs-message-input-group .dropdown-toggle::after { display: none; }
.tfs-message-ideas-btn {
  min-width: 3rem;
  border-color: var(--bs-border-color);
}
.tfs-message-dropdown {
  width: min(92vw, 520px);
  max-height: 320px;
  overflow: auto;
}
.tfs-message-dropdown .dropdown-item {
  white-space: normal;
  line-height: 1.25;
}

.tfs-pickup-soak-options { display: block; }
.tfs-pickup-soak-options.tfs-hidden { display: none; }

.tfs-gift-envelope {
  max-width: min(100%);
  height: auto;
}

.account-overview .user-box .user-avatar img#tfsSummaryBuyerFace {
  width: 72px;
  height: 72px;
  object-fit: cover;
}
.account-overview .user-box .user-name {
  min-width: 0;
  flex: 1 1 auto;
}
.account-overview .user-box .fullname#tfsSummaryBuyerName {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.05;
}

.tfs-gift-order-thumb {
  width: 100%;
  max-width: 170px;
  border-radius: 0.75rem;
  object-fit: cover;
  aspect-ratio: 534 / 274;
}

.tfs-pickup-soak-item .tfs-gift-order-thumb {
  object-fit: cover;
}

/* --- TFS Gift Card Demo Polish Pass 2 --- */
.tfs-summary-count-long {
  font-size: clamp(1.05rem, 1.7vw, 1.45rem) !important;
  line-height: 1.05;
  white-space: normal;
}

@media (min-width: 1200px) {
  #tfsOrderSummary .booking-box .booking-content {
    min-width: 0;
    flex: 1 1 auto;
  }
  #tfsOrderSummary .booking-box .booking-title {
    overflow-wrap: normal;
  }
}

#tfsFulfillmentAccordion .accordion-button .tfs-gift-badge {
  flex: 0 0 auto;
}


/* TFS unified process step marker borrowed from Booking Wizard v3.2 */
.tfs-flow-step-dot {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tfs-gift-teal);
  color: #fff;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0.25rem 0.65rem rgba(0, 121, 141, 0.22);
}

@media (max-width: 575.98px) {
  .tfs-flow-step-dot {
    width: 1.95rem;
    height: 1.95rem;
  }
}


/* V4: gift-specific sender photo in order summary */
.tfs-summary-from-line{display:flex;align-items:center;gap:.5rem;}
.tfs-summary-from-face{width:34px;height:34px;border-radius:50%;object-fit:cover;border:2px solid rgba(0,121,141,.25);}


/* V8: keep pickup-day soak summary text vertically centered on desktop */
@media (min-width: 992px) {
  .tfs-pickup-soak-item .row {
    align-items: center !important;
  }
  .tfs-pickup-soak-item .col-7,
  .tfs-pickup-soak-item .col-sm-8 {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* V9: summary polish + mailed-gift visual */
.tfs-summary-envelope-thumb {
  display: block;
  width: 100%;
  max-width: 170px;
  border-radius: 0.75rem;
  object-fit: cover;
  aspect-ratio: 534 / 274;
  border: 1px solid var(--tfs-gift-muted-border);
}

.tfs-delete-pickup-soak-btn {
  align-self: flex-start;
  width: auto !important;
  max-width: max-content;
}

@media (min-width: 992px) {
  .tfs-pickup-soak-item {
    display: flex;
    align-items: center;
  }
  .tfs-pickup-soak-item > .row {
    width: 100%;
    align-items: center !important;
  }
  .tfs-pickup-soak-item .col-7,
  .tfs-pickup-soak-item .col-sm-8 {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
