/* ════════════════════════════════════════════════════════════════
   TGIT Comments & Reviews — Light parchment theme
   File: assets/css/comments.css
   Enqueue on: is_singular() + comments_open() OR have_comments()
════════════════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────────────────── */
:root {
  --tgit-gold: #D4961E;
  --tgit-gold-hover: #B87D18;
  --tgit-gold-bg: #FEF9EE;
  --tgit-gold-light: rgba(212, 150, 30, .12);
  --tgit-ink: #1E1A14;
  --tgit-ink-soft: #4A3F32;
  --tgit-muted: #8A7B6D;
  --tgit-border: #E2D9CE;
  --tgit-parchment: #FBF8F3;
  --tgit-surface: #FFFFFF;
  --tgit-radius: 10px;
  --tgit-shadow: 0 2px 12px rgba(0, 0, 0, .07);
}

/* ── Section wrapper ──────────────────────────────────────────── */
.tgit-comments {
  padding-block: 3rem;
  max-width: 800px;
  margin-inline: auto;
}

/* ── Password locked ──────────────────────────────────────────── */
.tgit-comments--locked {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}

.tgit-comments__locked-card {
  text-align: center;
  max-width: 380px;
  padding: 2rem;
  border: 1px solid var(--tgit-border);
  border-radius: var(--tgit-radius);
  background: var(--tgit-surface);
}

.tgit-comments__locked-card .ti-lock {
  font-size: 2.5rem;
  color: var(--tgit-muted);
  margin-bottom: .75rem;
}

/* ════════════════════════════════════════════════════════════════
   PRODUCT REVIEWS — rating summary
════════════════════════════════════════════════════════════════ */
.tgit-review-summary {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  background: var(--tgit-surface);
  border: 1px solid var(--tgit-border);
  border-radius: var(--tgit-radius);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--tgit-shadow);
}

@media (max-width: 560px) {
  .tgit-review-summary {
    flex-direction: column;
    gap: 1.25rem;
  }
}

/* Score block */
.tgit-review-summary__score {
  text-align: center;
  flex-shrink: 0;
}

.tgit-review-summary__num {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--tgit-ink);
  line-height: 1;
  letter-spacing: -.03em;
}

.tgit-review-summary__stars {
  display: flex;
  justify-content: center;
  gap: .1rem;
  font-size: 1.1rem;
  color: var(--tgit-gold);
  margin: .35rem 0;
}

.tgit-review-summary__meta {
  font-size: .8125rem;
  color: var(--tgit-muted);
  white-space: nowrap;
}

/* Rating bars */
.tgit-review-summary__bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.tgit-rb-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.tgit-rb-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--tgit-muted);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .15rem;
  justify-content: flex-end;
}

.tgit-rb-label .ti {
  font-size: .65rem;
  color: var(--tgit-gold);
}

.tgit-rb-track {
  flex: 1;
  height: 7px;
  background: #EDE6DC;
  border-radius: 4px;
  overflow: hidden;
}

.tgit-rb-fill {
  height: 100%;
  background: var(--tgit-gold);
  border-radius: 4px;
  transition: width .5s ease;
}

.tgit-rb-pct {
  font-size: .75rem;
  color: var(--tgit-muted);
  width: 28px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════
   PRODUCT REVIEW CARDS
════════════════════════════════════════════════════════════════ */
.tgit-review-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tgit-review-card {
  background: var(--tgit-surface);
  border: 1px solid var(--tgit-border);
  border-radius: var(--tgit-radius);
  padding: 1.5rem;
  transition: box-shadow .2s;
}

.tgit-review-card:hover {
  box-shadow: var(--tgit-shadow);
}

.tgit-review-card__hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.tgit-review-card__author {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.tgit-review-card__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--tgit-gold-bg);
  color: var(--tgit-gold-hover);
  font-size: .875rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--tgit-gold-light);
  letter-spacing: .02em;
}

.tgit-review-card__name {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--tgit-ink);
}

.tgit-review-card__meta {
  font-size: .8rem;
  color: var(--tgit-muted);
  margin-top: .1rem;
}

.tgit-review-card__date {
  font-size: .8rem;
  color: var(--tgit-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.tgit-review-card__stars {
  display: flex;
  gap: .1rem;
  font-size: .875rem;
  color: var(--tgit-gold);
  margin-bottom: .75rem;
}

.tgit-review-card__stars .ti-star {
  color: var(--tgit-border);
}

.tgit-review-card__body {
  font-size: .9375rem;
  color: var(--tgit-ink-soft);
  line-height: 1.75;
}

.tgit-review-card__body p {
  margin: 0;
}

.tgit-review-card__verified {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .875rem;
  font-size: .75rem;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: .2rem .75rem;
}

.tgit-review-card__pending {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-top: .75rem;
  font-size: .8rem;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: .4rem .75rem;
}

/* ════════════════════════════════════════════════════════════════
   BLOG COMMENTS
════════════════════════════════════════════════════════════════ */
.tgit-comments__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--tgit-border);
}

.tgit-comments__heading {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--tgit-ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.tgit-comments__count {
  background: var(--tgit-gold-bg);
  color: var(--tgit-gold-hover);
  font-size: .75rem;
  font-weight: 800;
  padding: .15rem .6rem;
  border-radius: 20px;
}

.tgit-comments__none {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--tgit-muted);
  font-size: .9rem;
  padding: 1.5rem;
  background: var(--tgit-parchment);
  border-radius: var(--tgit-radius);
  border: 1px solid var(--tgit-border);
}

/* Comment list */
.tgit-comment-list,
.tgit-comment-list ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tgit-comment-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 2rem;
}

.tgit-blog-comment__inner {
  background: var(--tgit-surface);
  border: 1px solid var(--tgit-border);
  border-radius: var(--tgit-radius);
  padding: 1.25rem 1.5rem;
  transition: box-shadow .2s;
}

.tgit-blog-comment__inner:hover {
  box-shadow: var(--tgit-shadow);
}

/* Nested replies */
.tgit-comment-list .children {
  padding-left: 2rem;
  border-left: 2px solid var(--tgit-border);
  margin: .5rem 0 .5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

@media (max-width: 480px) {
  .tgit-comment-list .children {
    padding-left: 1rem;
    margin-left: .75rem;
  }
}

/* Comment header */
.tgit-blog-comment__hdr {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .875rem;
  flex-wrap: wrap;
}

.tgit-blog-comment__avatar {
  flex-shrink: 0;
}

.tgit-blog-comment__gravatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50%;
  display: block;
}

.tgit-blog-comment__initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tgit-gold-bg);
  color: var(--tgit-gold-hover);
  font-size: .8125rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--tgit-gold-light);
}

.tgit-blog-comment__meta {
  flex: 1;
}

.tgit-blog-comment__name {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--tgit-ink);
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.tgit-blog-comment__badge {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--tgit-gold-bg);
  color: var(--tgit-gold-hover);
  padding: .1rem .5rem;
  border-radius: 20px;
  border: 1px solid var(--tgit-gold-light);
}

.tgit-blog-comment__date {
  font-size: .8rem;
  color: var(--tgit-muted);
  display: block;
  margin-top: .1rem;
}

.tgit-blog-comment__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.tgit-blog-comment__reply a,
.tgit-blog-comment__edit a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--tgit-muted);
  text-decoration: none;
  padding: .2rem .6rem;
  border-radius: 5px;
  transition: color .15s, background .15s;
}

.tgit-blog-comment__reply a:hover {
  color: var(--tgit-gold);
  background: var(--tgit-gold-bg);
}

.tgit-blog-comment__edit a:hover {
  color: #2563eb;
  background: #eff6ff;
}

.tgit-blog-comment__body {
  font-size: .9375rem;
  color: var(--tgit-ink-soft);
  line-height: 1.75;
}

.tgit-blog-comment__body p {
  margin-bottom: .5em;
}

.tgit-blog-comment__body p:last-child {
  margin-bottom: 0;
}

.tgit-blog-comment__pending {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: .4rem .75rem;
  margin-bottom: .75rem;
}

/* ════════════════════════════════════════════════════════════════
   PAGINATION
════════════════════════════════════════════════════════════════ */
.tgit-comments__pagination {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin: 1.5rem 0 2rem;
}

.tgit-comments__pagination a,
.tgit-comments__pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--tgit-border);
  color: var(--tgit-muted);
  transition: background .15s, color .15s, border-color .15s;
}

.tgit-comments__pagination a:hover {
  background: var(--tgit-gold-bg);
  border-color: var(--tgit-gold);
  color: var(--tgit-gold);
}

.tgit-comments__pagination .current {
  background: var(--tgit-gold);
  border-color: var(--tgit-gold);
  color: #fff;
}

/* ════════════════════════════════════════════════════════════════
   COMMENT / REVIEW FORM
════════════════════════════════════════════════════════════════ */

/* Accordion toggle */
.tgit-cform-wrap {
  margin-top: 2.5rem;
}

.tgit-cform-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .875rem 1.25rem;
  background: var(--tgit-surface);
  border: 1.5px solid var(--tgit-border);
  border-radius: var(--tgit-radius);
  font-size: .9375rem;
  font-weight: 700;
  color: var(--tgit-ink);
  cursor: pointer;
  text-align: left;
  transition: background .2s, border-color .2s;
}

.tgit-cform-toggle:hover,
.tgit-cform-toggle[aria-expanded="true"] {
  background: var(--tgit-gold-bg);
  border-color: var(--tgit-gold);
  color: var(--tgit-ink);
}

.tgit-cform-toggle .ti:first-child {
  color: var(--tgit-gold);
  font-size: 1.05rem;
}

.tgit-cform-toggle span {
  flex: 1;
}

.tgit-cform-chevron {
  color: var(--tgit-muted);
  transition: transform .25s ease;
  flex-shrink: 0;
}

.tgit-cform-toggle[aria-expanded="true"] .tgit-cform-chevron {
  transform: rotate(180deg);
}

/* Form body */
.tgit-cform-body {
  margin-top: .75rem;
  background: var(--tgit-surface);
  border: 1px solid var(--tgit-border);
  border-radius: var(--tgit-radius);
  padding: 1.75rem;
  animation: tgit-slide-in .25s ease;
}

.tgit-cform-body[hidden] {
  display: none;
}

@keyframes tgit-slide-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fields */
.tgit-cform .tgit-cform__field,
.tgit-cform p.comment-form-comment,
.tgit-cform p.comment-form-author,
.tgit-cform p.comment-form-email {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1.125rem;
}

.tgit-cform__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .tgit-cform__field-row {
    grid-template-columns: 1fr;
  }
}

.tgit-cform label,
.tgit-cform .tgit-cform__field label {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--tgit-muted);
}

.tgit-cform__optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: .75rem;
  opacity: .65;
}

.tgit-req {
  color: var(--tgit-gold);
}

.tgit-cform__input,
.tgit-cform__select,
.tgit-cform input[type="text"],
.tgit-cform input[type="email"] {
  background: var(--tgit-surface);
  border: 1px solid var(--tgit-border);
  border-radius: 6px;
  padding: .7rem 1rem;
  font-size: .9375rem;
  color: var(--tgit-ink);
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}

.tgit-cform__textarea,
.tgit-cform textarea#comment {
  background: var(--tgit-surface);
  border: 1px solid var(--tgit-border);
  border-radius: 6px;
  padding: .7rem 1rem;
  font-size: .9375rem;
  color: var(--tgit-ink);
  resize: vertical;
  min-height: 110px;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  font-family: inherit;
}

.tgit-cform__input::placeholder,
.tgit-cform__textarea::placeholder,
.tgit-cform input::placeholder,
.tgit-cform textarea::placeholder {
  color: #B5A898;
}

.tgit-cform__input:focus,
.tgit-cform__textarea:focus,
.tgit-cform__select:focus,
.tgit-cform input:focus,
.tgit-cform textarea:focus {
  outline: none;
  border-color: var(--tgit-gold);
  box-shadow: 0 0 0 3px rgba(212, 150, 30, .12);
}

.tgit-cform__charcount {
  font-size: .75rem;
  color: var(--tgit-muted);
  text-align: right;
  display: block;
  margin-top: .2rem;
}

/* Star picker */
.tgit-cform__stars-field {
  margin-bottom: 1.25rem;
}

.tgit-star-picker {
  display: flex;
  flex-direction: row-reverse;
  gap: .2rem;
  width: fit-content;
}

.tgit-star-picker label {
  font-size: 2rem;
  color: var(--tgit-border);
  cursor: pointer;
  line-height: 1;
  transition: color .15s, transform .15s;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.tgit-star-picker label:hover,
.tgit-star-picker label:hover~label {
  color: var(--tgit-gold);
  transform: scale(1.15);
}

.tgit-star-picker input:checked~label {
  color: var(--tgit-gold);
}

.tgit-star-picker input:checked+label {
  transform: scale(1.2);
}

.tgit-star-hint {
  font-size: .8rem;
  color: var(--tgit-gold);
  min-height: 1.2em;
  margin-top: .3rem;
}

/* Cookies checkbox */
.tgit-cform__cookies label {
  display: flex !important;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--tgit-muted);
  cursor: pointer;
}

.tgit-cform__cookies input[type="checkbox"] {
  width: auto;
}

/* Logged-in note */
.tgit-cform__logged-in {
  font-size: .8125rem;
  color: var(--tgit-muted);
  margin-bottom: 1rem;
  background: var(--tgit-parchment);
  border: 1px solid var(--tgit-border);
  border-radius: 6px;
  padding: .6rem .9rem;
}

.tgit-cform__logged-in a {
  color: var(--tgit-gold);
}

.tgit-cform__login-msg {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--tgit-muted);
  font-size: .9rem;
  padding: 1rem;
  background: var(--tgit-parchment);
  border-radius: 6px;
  border: 1px solid var(--tgit-border);
}

.tgit-cform__login-msg a {
  color: var(--tgit-gold);
}

/* Footer note */
.tgit-cform__footer-note {
  font-size: .8rem;
  color: var(--tgit-muted);
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-top: .5rem;
}

/* Cancel reply */
.tgit-cform__cancel-wrap {
  margin-top: .5rem;
}

.tgit-cform__cancel-wrap a {
  font-size: .8125rem;
  color: var(--tgit-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Submit row */
.tgit-cform__submit-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tgit-border);
}

/* Submit button */
.tgit-cform__submit,
#tgit-cform-submit {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 2rem;
  background: var(--tgit-gold);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  font-family: inherit;
}

.tgit-cform__submit:hover,
#tgit-cform-submit:hover {
  background: var(--tgit-gold-hover);
  transform: translateY(-1px);
}

.tgit-cform__submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* ── Accessibility ──────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Reveal animation ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease, transform .45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ════════════════════════════════════════════════════════════════
   INLINE COMMENT EDITOR
════════════════════════════════════════════════════════════════ */

/* Edit button — blog comments */
.tgit-blog-comment__edit {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--tgit-muted);
  padding: .2rem .6rem;
  border-radius: 5px;
  transition: color .15s, background .15s;
  font-family: inherit;
}

.tgit-blog-comment__edit:hover {
  color: var(--tgit-gold);
  background: var(--tgit-gold-bg);
}

.tgit-blog-comment__edit.is-editing {
  color: #6b7280;
  background: #f3f4f6;
}

/* Edit button — review cards (top-right float) */
.tgit-review-card__edit {
  float: right;
  background: none;
  border: 1px solid var(--tgit-border);
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--tgit-muted);
  padding: .2rem .6rem;
  margin-bottom: .5rem;
  transition: color .15s, background .15s, border-color .15s;
  font-family: inherit;
}

.tgit-review-card__edit:hover {
  color: var(--tgit-gold);
  border-color: var(--tgit-gold);
  background: var(--tgit-gold-bg);
}

.tgit-review-card__edit.is-editing {
  color: #6b7280;
  border-color: #d1d5db;
  background: #f9fafb;
}

/* Loading state on the text while fetching */
.tgit-comment-text.is-loading {
  opacity: .4;
  pointer-events: none;
}

/* Inline edit form container */
.tgit-inline-edit-form {
  margin-top: .75rem;
  border: 1.5px solid var(--tgit-gold);
  border-radius: var(--tgit-radius);
  background: var(--tgit-gold-bg);
  padding: 1.25rem;
  animation: tgit-slide-in .2s ease;
}

.tgit-inline-edit-form[hidden] {
  display: none;
}

/* Textarea inside inline form */
.tgit-inline-edit-form textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--tgit-border);
  border-radius: 6px;
  padding: .7rem 1rem;
  font-size: .9375rem;
  font-family: inherit;
  color: var(--tgit-ink);
  background: var(--tgit-surface);
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.tgit-inline-edit-form textarea:focus {
  outline: none;
  border-color: var(--tgit-gold);
  box-shadow: 0 0 0 3px rgba(212, 150, 30, .12);
}

/* Action row */
.tgit-inline-edit-form__actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}

/* Save button */
.tgit-inline-edit-form__save {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  background: var(--tgit-gold);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .15s;
}

.tgit-inline-edit-form__save:hover {
  background: var(--tgit-gold-hover);
  transform: translateY(-1px);
}

.tgit-inline-edit-form__save:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* Cancel button */
.tgit-inline-edit-form__cancel {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1rem;
  background: transparent;
  border: 1px solid var(--tgit-border);
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--tgit-muted);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}

.tgit-inline-edit-form__cancel:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: var(--tgit-ink);
}

/* Status messages */
.tgit-inline-edit-form__msg {
  font-size: .8rem;
  padding: .3rem .6rem;
  border-radius: 4px;
  display: none;
  align-items: center;
  gap: .3rem;
}

.tgit-inline-edit-form__msg.success {
  display: inline-flex;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.tgit-inline-edit-form__msg.error {
  display: inline-flex;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/**
  * Search Css
  */
/* Suggested CSS Fixes */
#tgit-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

#tgit-results-header {
    display: block !important;
    margin-bottom: 20px;
    font-weight: 600;
}

.tgit-card-image-wrap {
    aspect-ratio: 4 / 3;
    height: auto !important;
    overflow: hidden;
}

.tgit-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

div#tgit-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

div#tgit-results-header {
  display: block;
  margin-bottom: 20px;
}

.tgit-card-image-wrap {
  aspect-ratio: 4 / 3;
  height: auto;
}


/* Quick fix to align WooCommerce Account Navigation and Content */
@media (min-width: 768px) {
    .woocommerce-account .woocommerce {
        display: flex;
        gap: 40px;
    }
    .woocommerce-MyAccount-navigation {
        flex: 0 0 25%;
        list-style: none;
        padding: 0;
    }
    .woocommerce-MyAccount-navigation li {
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }
    .woocommerce-MyAccount-content {
        flex: 1;
    }
}

/* Styling the WooCommerce Addresses Tab */
.woocommerce-account .woocommerce-MyAccount-content h3, 
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #111;
}

/* Add spacing around the address section introductory text */
.woocommerce-account .woocommerce-MyAccount-content > p {
    margin-bottom: 25px;
    color: #555;
    font-size: 0.95rem;
}

/* Format the empty address notification / text links */
.woocommerce-account .woocommerce-MyAccount-content .u-columns .u-column1,
.woocommerce-account .woocommerce-MyAccount-content .u-columns .u-column2 {
    background: #fdfdfd;
    border: 1px solid #e4e4e4;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Style the "Add" or "Edit" link to look like a subtle, clean action link */
.woocommerce-account .woocommerce-MyAccount-content a.edit {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    color: #0073aa; /* Change to your theme's primary color */
    text-decoration: underline;
}

.woocommerce-account .woocommerce-MyAccount-content a.edit:hover {
    color: #111;
}

/* Make addresses display side-by-side on desktop views */
@media (min-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-content .u-columns {
        display: flex;
        gap: 30px;
    }
    .woocommerce-account .woocommerce-MyAccount-content .u-columns .u-column1,
    .woocommerce-account .woocommerce-MyAccount-content .u-columns .u-column2 {
        flex: 1;
        margin-bottom: 0;
    }
}

/* Apply theme variables and match existing design patterns */
.tgit-account__addresses {
  --theme-border: var(--acc-border, #E2D9CE);
  --theme-radius: var(--acc-radius, 10px);
  --theme-ink: var(--acc-ink, #1E1A14);
  
  margin-top: 1.5rem;
}

/* 1. Header inside the addresses section */
.tgit-account__addresses h2 {
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--theme-ink);
  margin: 1.5rem 0 1rem;
}

/* 2. Grid Layout for Fields (matching modern theme layouts) */
.woocommerce-address-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Full-width overrides for specific fields */
.form-row#billing_address_1_field,
.form-row#billing_address_2_field,
.form-row#billing_country_field,
.form-row#billing_email_field,
.form-row#shipping_address_1_field,
.form-row#shipping_address_2_field,
.form-row#shipping_country_field {
  grid-column: span 2;
}

/* 3. Inputs & Selects styled as per theme's clean look */
.tgit-account__addresses input[type="text"],
.tgit-account__addresses input[type="email"],
.tgit-account__addresses input[type="tel"],
.tgit-account__addresses select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--theme-border) !important;
  border-radius: var(--theme-radius);
  background-color: #fdfcfb; /* Subtle off-white to match the paper-like theme */
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--theme-ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.tgit-account__addresses input:focus {
  outline: none;
  border-color: #1E1A14 !important; /* Matches your ink color */
  box-shadow: 0 0 0 2px rgba(30, 26, 20, 0.05);
}

/* 4. Labels */
.tgit-account__addresses label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #6b7280;
  margin-bottom: 0.375rem;
}

/* 5. Submit Button (matches typical theme primary buttons) */
.tgit-account__addresses .button {
  margin-top: 2rem;
  padding: 0.75rem 2rem;
  background-color: var(--theme-ink);
  color: #ffffff;
  border-radius: var(--theme-radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.tgit-account__addresses .button:hover {
  opacity: 0.9;
}

/* 6. Mobile Responsiveness */
@media (max-width: 768px) {
  .woocommerce-address-fields__field-wrapper {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .form-row {
    grid-column: span 1 !important;
  }
}

/* 1. Improve the main container layout */
.tgit-account__body {
    display: grid;
    grid-template-columns: 240px 1fr; /* 240px nav, flexible content */
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    align-items: start;
}

/* 2. Fix the sticky navigation */
.tgit-account__nav {
    position: sticky;
    top: 2rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 3. Style the Content Area and Inner Section */
.tgit-account__content {
    min-width: 0; /* Prevents grid overflow */
}

.tgit-account__content section {
    background-color: #ffffff; /* White background card */
    border: 1px solid #e5e7eb; /* Subtle border */
    border-radius: 12px; /* Matching corner radius */
    padding: 2rem; /* Comfortable internal spacing */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Soft shadow for depth */
}

/* 4. Fix typography hierarchy inside the content */
.tgit-account__section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* 5. Mobile Responsiveness */
@media (max-width: 860px) {
    .tgit-account__body {
        grid-template-columns: 1fr; /* Stack columns on mobile */
        padding: 1rem;
    }

    .tgit-account__nav {
        position: static;
        flex-direction: row;
        overflow-x: auto; /* Horizontal scroll for nav if needed */
        white-space: nowrap;
    }
}

/* 1. Restore WooCommerce 2-Column Layout for Names */
.edit-account .form-row-first,
.edit-account .form-row-last {
    width: 48% !important;
    float: left;
    display: block;
    margin-bottom: 1.5rem;
}

.edit-account .form-row-last {
    float: right;
}

.edit-account .clear {
    clear: both;
}

/* 2. Style Labels for better hierarchy */
.edit-account label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* 3. Modernize Input Fields */
.edit-account input[type="text"],
.edit-account input[type="email"],
.edit-account input[type="password"],
.edit-account input[type="tel"] {
    width: 100%;
    height: auto; /* Reset the 24px height */
    padding: 10px 14px;
    border: 1px solid #d1d5db !important; /* Visible border */
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.edit-account input:focus {
    outline: none;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 4. Fieldset (Password Change Section) Styling */
.edit-account fieldset {
    border: 1px solid #f3f4f6;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.edit-account fieldset legend {
    font-weight: 700;
    padding: 0 0.75rem;
    color: #111827;
}

/* 5. Submit Button Styling */
.edit-account button.button {
    padding: 0.75rem 2.5rem;
    background-color: #111827; /* Matches theme ink */
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.edit-account button.button:hover {
    opacity: 0.9;
}

/* 6. Mobile Responsiveness */
@media (max-width: 600px) {
    .edit-account .form-row-first,
    .edit-account .form-row-last {
        width: 100% !important;
        float: none;
    }
}

/* Recommended CSS to match the theme */
.woocommerce form.login {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  margin-top: 1rem;
  max-width: 400px;
}

.woocommerce form.login label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.woocommerce form.login input[type="text"], 
.woocommerce form.login input[type="password"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.woocommerce form.login button.woocommerce-form-login__submit {
  width: 100%;
  background-color: #2563eb; /* Primary Blue */
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}










/* --- Structure & Layout --- */
section.woocommerce-order-details {
  width: 100%;
  clear: both;
  margin: 2.5rem 0; /* Combines top/bottom 2.5rem and left/right 0 */
}

section.woocommerce-customer-details {
  width: 100%;
  margin: 0;
}

.woocommerce-MyAccount-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Addresses Grid */
.woocommerce-columns--addresses {
  display: flex;
  gap: 2rem;
  width: 100%;
}

.woocommerce-column--billing-address,
.woocommerce-column--shipping-address {
  flex: 1 1 0%;
  min-width: 0;
}

/* --- Typography --- */
h2.woocommerce-order-details__title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  display: block;
}

/* --- Tables & Data --- */

/* --- Container Card --- */
section.woocommerce-order-details {
  background: rgb(255, 255, 255);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
  border: 1px solid rgb(243, 244, 246);
  margin-bottom: 3rem;
}

/* --- Table Structure --- */
table.woocommerce-table {
  width: 100%; /* Added to ensure full-width layout */
  border-collapse: separate;
  border-spacing: 0px;
  overflow: hidden;
  border-radius: 8px;
}

/* Combined all identical Table Header (TH) selectors into one */
th.woocommerce-table__product-name,
th.woocommerce-table__product-table,
th.order-actions--heading {
  background-color: rgb(249, 250, 251);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: rgb(75, 85, 99);
  padding: 1rem;
  border-bottom: 1px solid rgb(229, 231, 235);
  text-align: left; /* Added for standard table alignment consistency */
}

/* Combined all identical Table Data (TD) selectors into one */
td.woocommerce-table__product-name,
td.woocommerce-table__product-total {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgb(243, 244, 246);
  vertical-align: top;
}

/* --- Status Badge --- */
mark.order-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: rgb(209, 250, 229);
  color: rgb(6, 95, 70);
}



/* --- List Container --- */
.woocommerce-table ul.wc-item-meta {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: rgb(107, 114, 128);
  line-height: 1.4;
}

/* --- List Items --- */
ul.wc-item-meta li {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.25rem;
}

/* --- Inline Typography --- */
ul.wc-item-meta li strong {
  display: inline-block;
  color: rgb(55, 65, 81);
  font-weight: 600;
  margin-right: 0.25rem;
}

ul.wc-item-meta li p {
  display: inline;
  margin: 0;
}


.woocommerce-table--order-details tfoot th,
.woocommerce-table--order-details tfoot td {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    text-align: left;
}

.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td {
    font-weight: 700;
    font-size: 1.1em;
}

.woocommerce-table tfoot th.order-actions--heading {
  padding: 12px 16px;
  border-top: 1px solid rgb(229, 231, 235);
  text-align: left;
}

.woocommerce-table tfoot th {
  padding: 12px 16px;
  border-top: 1px solid rgb(229, 231, 235);
  text-align: left;
  font-weight: 700;
  font-size: 1.1em;
}

.woocommerce-table tfoot td {
  padding: 12px 16px;
  border-top: 1px solid rgb(229, 231, 235);
  text-align: left;
  font-weight: 700;
  font-size: 1.1em;
}

main#main-content {
    margin-top: 80px;
}

/* Container styling */
.woocommerce-pagination {
    text-align: center;
    margin: 30px auto;
}

/* List styling */
.woocommerce-pagination ul.page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f9f9f9;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    overflow: hidden;
}

/* Individual item borders */
.woocommerce-pagination ul.page-numbers li {
    border-right: 1px solid #e4e4e4;
    margin: 0;
}

.woocommerce-pagination ul.page-numbers li:last-child {
    border-right: none;
}

/* General button links and spans */
.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #333333;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

/* Hover state for links */
.woocommerce-pagination ul.page-numbers li a:hover {
    background-color: #f0f0f0;
    color: #000000;
}

/* Active/Current page state */
.woocommerce-pagination ul.page-numbers li span.current {
    background-color: #111111; /* Change to your primary brand color */
    color: #ffffff;
}

/* Prev/Next arrows specific padding adjustment if needed */
.woocommerce-pagination ul.page-numbers li a.prev,
.woocommerce-pagination ul.page-numbers li a.next {
    font-weight: bold;
}

/* Style the WooCommerce result count text */
.woocommerce-result-count {
    font-size: 0.95rem;
    color: #666666; /* Muted gray to not compete with headings */
    font-weight: 400;
    margin: 0 0 20px 0; /* Adds spacing below the text */
    display: inline-block;
    float: left; /* Aligns it to the left side if your sorting dropdown floats right */
}

/* Clearfix for the product sorting controls container if necessary */
.woocommerce-shop-ordering, 
.woocommerce-result-count {
    margin-bottom: 25px;
}

/* Container for the dropdown layout */
.woocommerce-ordering {
    margin: 0 0 20px 0;
    display: inline-block;
    float: right; /* Pushes the dropdown to the right side opposite of the result count */
}

/* Style the actual select dropdown element */
.woocommerce-ordering select.orderby {
    font-size: 0.9rem;
    color: #2c3e50;
    background-color: #ffffff;
    padding: 10px 36px 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    
    /* Clean custom arrow styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

/* Focus and hover states */
.woocommerce-ordering select.orderby:hover {
    border-color: #b3b3b3;
}

.woocommerce-ordering select.orderby:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.1);
}

/* Clear alignment fix for shop grid rows underneath */
.woocommerce-result-count,
.woocommerce-ordering {
    margin-bottom: 30px;
}

/* Ensure the layout stacks gracefully on mobile screens */
@media (max-width: 768px) {
    .woocommerce-result-count,
    .woocommerce-ordering {
        float: none;
        display: block;
        width: 100%;
        margin-bottom: 15px;
    }
    .woocommerce-ordering select.orderby {
        width: 100%;
    }
}

/* Mapping for .common-paragraph (Body Text) */
p:not([class*="font-script"]), 
.tgit-hero p {
    font-family: "Martina Plantijn", sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    line-height: 24px !important;
    text-align: left !important;
    /* color: #3e2a2e !important; */
}

/* Mapping for .common-title-44px (Section Titles) */
h2.font-serif,
.tgit-hero h1 {
    font-family: "Martina Plantijn", sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    font-size: 30px !important;
    font-weight: 300 !important;
    line-height: 36px !important;
}

/* Mapping for .common-header (Small Uppercase Headers) */
h2.text-xs.uppercase,
.text-xs.font-semibold.uppercase.tracking-widest {
    font-family: Söhne, sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 400 !important;
    line-height: 15.25px !important;
    letter-spacing: .2em !important;
    text-align: left !important;
    color: #333 !important;
    text-transform: uppercase !important;
}

/* Mapping for Navigation Links */
header nav a,
header #site-header a.text-sm.font-medium {
    position: relative !important;
    padding-bottom: 2px !important;
    padding-top: 2px !important;
    font-family: soehne-buch, sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 400 !important;
    letter-spacing: .1em !important;
    text-align: center !important;
    text-transform: uppercase !important;
}