/* TGStock site suggestions — global header button and modal */
.tg-suggestions-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tgh-muted, #9eabc7);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.tg-suggestions-nav:hover,
.tg-suggestions-nav:focus-visible {
  background: transparent;
  color: #fff;
  outline: none;
}

.tg-suggestions-nav:active {
  transform: translateY(1px);
}

.tg-suggestions-nav::before {
  display: none;
  content: none;
}

.tg-suggestions-mobile {
  display: none;
}

.tg-suggestions-badge {
  display: none;
  min-width: 18px;
  height: 18px;
  margin-left: 7px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #ff6b7a;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
}

.tg-suggestions-badge.is-visible {
  display: inline-grid;
}

.tg-suggestions-overlay,
.tg-suggestions-overlay * {
  box-sizing: border-box;
}

.tg-suggestions-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(4, 8, 20, .68);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.tg-suggestions-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.tg-suggestions-dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: min(680px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid #293756;
  border-radius: 17px;
  background: #11182c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
  color: #f5f7ff;
  transform: translateY(12px) scale(.985);
  transition: transform .22s ease;
}

.tg-suggestions-overlay.is-open .tg-suggestions-dialog {
  transform: translateY(0) scale(1);
}

.tg-suggestions-dialog--admin {
  width: min(760px, 100%);
}

.tg-suggestions-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 19px 56px 14px 20px;
  border-bottom: 1px solid rgba(41, 55, 86, .82);
  background: rgba(17, 24, 44, .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.tg-suggestions-eyebrow {
  display: none;
}

.tg-suggestions-title {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.12;
}

.tg-suggestions-subtitle {
  max-width: 450px;
  margin: 6px 0 0;
  color: #aab6cf;
  font-size: 13px;
  line-height: 1.45;
}

.tg-suggestions-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid #2d3b5b;
  border-radius: 9px;
  background: #17213a;
  color: #bac5dc;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.tg-suggestions-close:hover,
.tg-suggestions-close:focus-visible {
  border-color: #526585;
  color: #fff;
  outline: none;
}

.tg-suggestions-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 20px 0;
}

.tg-suggestions-tab {
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #8f9db8;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.tg-suggestions-tab[aria-selected='true'] {
  border-color: #334361;
  background: #18233d;
  color: #fff;
}

.tg-suggestions-body {
  max-height: calc(min(680px, 100vh - 36px) - 112px);
  overflow: auto;
  padding: 16px 20px 20px;
  scrollbar-color: #405071 transparent;
}

.tg-suggestions-view[hidden],
.tg-suggestions-success[hidden],
.tg-suggestions-admin-empty[hidden] {
  display: none !important;
}

.tg-suggestions-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 27px;
  margin-bottom: 13px;
  padding: 4px 9px;
  border: 1px solid #273552;
  border-radius: 999px;
  background: rgba(24, 35, 61, .76);
  color: #aebad2;
  font-size: 11px;
  font-weight: 700;
}

.tg-suggestions-identity::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60d99a;
  box-shadow: 0 0 0 4px rgba(96, 217, 154, .1);
}

.tg-suggestions-label {
  display: block;
  margin: 0 0 7px;
  color: #dce4f6;
  font-size: 13px;
  font-weight: 800;
}

.tg-suggestions-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.tg-suggestions-category {
  min-height: 34px;
  padding: 7px 6px;
  border: 1px solid #2b3958;
  border-radius: 8px;
  background: #141f37;
  color: #9eacc5;
  font: inherit;
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
}

.tg-suggestions-category:hover,
.tg-suggestions-category:focus-visible {
  border-color: #50648b;
  color: #fff;
  outline: none;
}

.tg-suggestions-category[aria-checked='true'] {
  border-color: #718bff;
  background: linear-gradient(135deg, rgba(111, 140, 255, .2), rgba(139, 92, 246, .17));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(113, 139, 255, .15);
}

.tg-suggestions-field {
  margin-top: 13px;
}

.tg-suggestions-textarea,
.tg-suggestions-input,
.tg-suggestions-admin-select,
.tg-suggestions-admin-note,
.tg-suggestions-filter {
  width: 100%;
  border: 1px solid #2b3958;
  border-radius: 13px;
  background: #101a30;
  color: #f6f8ff;
  font: inherit;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.tg-suggestions-textarea {
  min-height: 112px;
  padding: 12px 13px 30px;
  resize: vertical;
  line-height: 1.55;
}

.tg-suggestions-input,
.tg-suggestions-admin-select,
.tg-suggestions-filter {
  min-height: 40px;
  padding: 8px 11px;
}

.tg-suggestions-admin-note {
  min-height: 72px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.45;
}

.tg-suggestions-textarea:focus,
.tg-suggestions-input:focus,
.tg-suggestions-admin-select:focus,
.tg-suggestions-admin-note:focus,
.tg-suggestions-filter:focus {
  border-color: #718bff;
  box-shadow: 0 0 0 3px rgba(111, 140, 255, .12);
}

.tg-suggestions-textarea::placeholder,
.tg-suggestions-input::placeholder,
.tg-suggestions-admin-note::placeholder {
  color: #6f7e9a;
}

.tg-suggestions-message-wrap {
  position: relative;
}

.tg-suggestions-counter {
  position: absolute;
  right: 13px;
  bottom: 10px;
  color: #74839f;
  font-size: 11px;
  font-weight: 700;
}

.tg-suggestions-hint {
  margin: 7px 0 0;
  color: #72809a;
  font-size: 12px;
  line-height: 1.45;
}

.tg-suggestions-contact-details {
  margin-top: 12px;
}

.tg-suggestions-contact-details summary {
  width: fit-content;
  color: #8f9db8;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.tg-suggestions-contact-details summary::-webkit-details-marker {
  display: none;
}

.tg-suggestions-contact-details summary::before {
  content: '+';
  display: inline-block;
  width: 16px;
  margin-right: 4px;
  color: #8197fa;
  font-weight: 900;
}

.tg-suggestions-contact-details[open] summary::before {
  content: '−';
}

.tg-suggestions-error {
  min-height: 20px;
  margin: 9px 0 0;
  color: #ff9ca8;
  font-size: 13px;
  font-weight: 700;
}

.tg-suggestions-submit,
.tg-suggestions-again,
.tg-suggestions-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 4px;
  padding: 10px 15px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #6f8cff, #8b5cf6);
  box-shadow: 0 10px 28px rgba(111, 92, 246, .23);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.tg-suggestions-submit {
  width: 100%;
}

.tg-suggestions-submit:disabled,
.tg-suggestions-save:disabled {
  cursor: wait;
  opacity: .62;
}

.tg-suggestions-success {
  padding: 14px 4px 8px;
  text-align: center;
}

.tg-suggestions-success-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid rgba(96, 217, 154, .4);
  border-radius: 14px;
  background: rgba(96, 217, 154, .1);
  color: #75e7ad;
  font-size: 24px;
  font-weight: 900;
}

.tg-suggestions-success h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.tg-suggestions-success p {
  max-width: 430px;
  margin: 0 auto 17px;
  color: #9eabc5;
  line-height: 1.55;
}

.tg-suggestions-admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.tg-suggestions-filter {
  max-width: 230px;
}

.tg-suggestions-refresh {
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid #2d3b5b;
  border-radius: 11px;
  background: #17213a;
  color: #c5cee1;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.tg-suggestions-admin-list {
  display: grid;
  gap: 12px;
}

.tg-suggestions-card {
  padding: 12px;
  border: 1px solid #283653;
  border-radius: 12px;
  background: rgba(16, 26, 48, .84);
}

.tg-suggestions-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tg-suggestions-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #7f8da8;
  font-size: 11px;
  font-weight: 700;
}

.tg-suggestions-card-category {
  color: #9eafff;
}

.tg-suggestions-card-message {
  margin: 12px 0;
  color: #edf1fb;
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tg-suggestions-card-author {
  margin: 0 0 13px;
  color: #91a0bb;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tg-suggestions-card-actions {
  display: grid;
  grid-template-columns: minmax(150px, .55fr) minmax(220px, 1fr) auto;
  gap: 9px;
  align-items: end;
}

.tg-suggestions-save {
  min-height: 42px;
  margin: 0;
  padding: 9px 14px;
  border-radius: 11px;
  font-size: 12px;
}

.tg-suggestions-admin-empty,
.tg-suggestions-admin-loading {
  padding: 32px 12px;
  color: #8f9db7;
  text-align: center;
}

@media (max-width: 900px) {
  .tg-suggestions-desktop {
    font-size: 14px;
  }
}

@media (max-width: 760px) {
  .tg-suggestions-desktop {
    display: none;
  }

  .tg-suggestions-mobile {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    padding: 0 9px;
    border: 1px solid var(--tgh-border, #263352);
    border-radius: 10px;
    background: var(--tgh-soft, #18233f);
    font-size: 0;
  }

  .tg-suggestions-mobile::before {
    content: '+';
    display: grid;
    width: 18px;
    height: 18px;
    margin-right: 0;
    place-items: center;
    color: #dce4f6;
    font-size: 18px;
    font-weight: 600;
  }

  .tg-suggestions-mobile .tg-suggestions-badge {
    margin-left: 5px;
    font-size: 10px;
  }

  .tg-suggestions-overlay {
    align-items: end;
    padding: 0;
  }

  .tg-suggestions-dialog,
  .tg-suggestions-dialog--admin {
    width: 100%;
    max-height: 94dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 17px 17px 0 0;
    transform: translateY(30px);
  }

  .tg-suggestions-head {
    padding: 18px 52px 13px 17px;
  }

  .tg-suggestions-close {
    top: 13px;
    right: 13px;
  }

  .tg-suggestions-tabs {
    padding-right: 17px;
    padding-left: 17px;
  }

  .tg-suggestions-body {
    max-height: calc(94dvh - 110px);
    padding: 15px 17px 18px;
  }

  .tg-suggestions-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .tg-suggestions-card-actions {
    grid-template-columns: 1fr;
  }

  .tg-suggestions-admin-toolbar {
    align-items: stretch;
  }

  .tg-suggestions-filter {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tg-suggestions-overlay,
  .tg-suggestions-dialog,
  .tg-suggestions-nav {
    transition: none;
  }
}

/* Universal header alignment fix — 2026-08-22 */
header.topbar nav,
#tgstockUnifiedHeader nav {
  align-items: center !important;
}

header.topbar nav > .tg-suggestions-nav,
#tgstockUnifiedHeader nav > .tg-suggestions-nav {
  display: inline-flex !important;
  align-self: center !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  top: auto !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  transform: none !important;
}

header.topbar nav > .tg-suggestions-nav .tg-suggestions-button-label,
#tgstockUnifiedHeader nav > .tg-suggestions-nav .tg-suggestions-button-label {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}
