/* Site-specific styles on top of assets/css/app.css (static utility CSS) */

/* --- Accessibility: missing purged Tailwind utilities + contrast fixes --- */
#site-header {
  color: #e5e7eb;
}
#site-header a:not(.header-auth-btn--signup):not(.nav-country-link--empty):not(.nav-topic-link--empty):not(.nav-region-link--empty):hover,
#site-header button:hover,
#site-header label:hover {
  color: #fff;
}
#site-header .header-search-input {
  color: #fff;
}
#site-header .header-search-input::placeholder {
  color: #d1d5db;
  opacity: 1;
}
#site-header .header-search-submit {
  color: #f3f4f6;
}
/* Header toolbar hover (bg-white/* utilities not in purged app.css) */
#site-header .header-currency-wrap,
#site-header .header-lang-btn,
#site-header .header-auth-btn--signin,
#site-header .header-auth-btn--signout,
#site-header .header-search-submit,
#site-header .header-toolbar .header-actions > a:not(.header-auth-btn--signup) {
  border-radius: 0.375rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#site-header .header-currency-wrap:hover,
#site-header .header-lang-btn:hover,
#site-header .header-auth-btn--signin:hover,
#site-header .header-auth-btn--signout:hover,
#site-header .header-search-submit:hover,
#site-header .header-toolbar .header-actions > a:not(.header-auth-btn--signup):hover {
  background-color: rgba(255, 255, 255, 0.1);
}
#site-header .header-auth-btn--signup {
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.2);
}
#site-header .header-auth-btn--signup:hover {
  background-color: rgba(255, 255, 255, 0.3);
}
a.text-blue-700,
.text-blue-700 {
  --tw-text-opacity: 1;
  color: rgb(30 58 138 / var(--tw-text-opacity, 1));
}
a.text-blue-700:hover,
.hover\:text-blue-800:hover {
  --tw-text-opacity: 1;
  color: rgb(23 37 84 / var(--tw-text-opacity, 1));
}
.group:hover .group-hover\:text-blue-700 {
  --tw-text-opacity: 1;
  color: rgb(30 58 138 / var(--tw-text-opacity, 1));
}

.account-listings-sort-th {
  vertical-align: middle;
}
.account-listings-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  color: inherit;
  text-decoration: none;
  border-radius: 0.25rem;
}
.account-listings-sort-link:hover {
  color: rgb(29 78 216);
  text-decoration: underline;
}
.account-listings-sort-th.is-active .account-listings-sort-link {
  color: rgb(29 78 216);
  font-weight: 600;
}
th.text-center .account-listings-sort-link {
  justify-content: center;
  width: 100%;
}

/* account.php: toolbar buttons (padding utilities often purged from app.css) */
.account-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.account-toolbar .account-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.625rem;
  min-height: 0;
  font-size: 0.8125rem;
  line-height: 1.2;
  font-weight: 500;
  border-radius: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.account-toolbar .account-toolbar-btn--primary,
.account-toolbar .account-toolbar-btn--primary:visited {
  border: 1px solid rgb(37 99 235);
  background-color: rgb(37 99 235);
  color: #fff !important;
}
.account-toolbar .account-toolbar-btn--primary:hover,
.account-toolbar .account-toolbar-btn--primary:focus-visible {
  background-color: rgb(29 78 216);
  border-color: rgb(29 78 216);
  color: #fff !important;
}
.account-toolbar .account-toolbar-btn--secondary,
.account-toolbar .account-toolbar-btn--secondary:visited {
  border: 1px solid rgb(209 213 219);
  background-color: rgb(229 231 235);
  color: rgb(55 65 81) !important;
}
.account-toolbar .account-toolbar-btn--secondary:hover,
.account-toolbar .account-toolbar-btn--secondary:focus-visible {
  background-color: #fff;
  border-color: rgb(209 213 219);
  color: rgb(17 24 39) !important;
}

/* wishlist.php: per-listing details */
.wishlist-item-meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  row-gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgb(55 65 81);
}
.wishlist-item-meta > span {
  display: inline-block;
  margin-right: 0.15rem;
}
.wishlist-item-meta__label {
  font-weight: 600;
  color: rgb(31 41 55);
}

.listing-meta-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1rem;
  row-gap: 0.375rem;
  align-items: baseline;
}
.listing-meta-grid dt {
  margin: 0;
  font-weight: 500;
  color: rgb(55 65 81);
}
.listing-meta-grid dd {
  margin: 0;
  min-width: 0;
}

/* create-listing.php / edit-listing.php: submit row spacing */
.create-listing-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
@media (min-width: 640px) {
  .create-listing-form-actions {
    gap: 1rem;
  }
}
.create-listing-form-actions .create-listing-action-btn {
  display: inline-block;
  border-radius: 0.5rem;
  background-color: #2563eb;
  color: #fff;
  padding: 0.75rem 2rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-align: center;
}
.create-listing-form-actions .create-listing-action-btn:hover {
  background-color: #1d4ed8;
}
.create-listing-form-actions button.create-listing-action-btn {
  border: 0;
  cursor: pointer;
}

/* listing.php: contact seller */
.listing-contact-seller {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(243 244 246);
}
.listing-message-sent.listing-wishlist-btn {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
  padding: 0.75rem 1.25rem;
  cursor: default;
  white-space: normal;
  text-align: left;
}
.listing-message-sent.listing-wishlist-btn:hover {
  background-color: rgb(254 243 199);
  border-color: rgb(245 158 11);
  color: rgb(146 64 14);
}
.listing-message-sent__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgb(120 53 15);
}
.listing-message-sent__text {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgb(146 64 14);
}
.listing-message-sent__btn {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(217 119 6);
  background-color: rgb(255 255 255);
  color: rgb(120 53 15);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.listing-message-sent__btn:hover {
  background-color: rgb(253 230 138);
  border-color: rgb(180 83 9);
  color: rgb(92 42 12);
}

/* account.php: listing action buttons */
.account-listing-btn--amber {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  border: 1px solid rgb(245 158 11);
  background-color: rgb(254 243 199);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  color: rgb(146 64 14);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.account-listing-btn--amber:hover {
  background-color: rgb(253 230 138);
  border-color: rgb(217 119 6);
  color: rgb(120 53 15);
}
button.account-listing-btn--amber {
  font-family: inherit;
}

/* account.php: listing contact messages */
.account-listing-messages-stack {
  max-width: 42rem;
}
.account-message-thread + .account-message-thread {
  padding-top: 0.75rem;
  border-top: 1px solid rgb(229 231 235);
}
.account-message-thread__party {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: rgb(75 85 99);
}
.account-message-thread__label {
  font-weight: 600;
  color: rgb(55 65 81);
  margin-right: 0.25rem;
}
.account-message-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.account-message-list__item + .account-message-list__item {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgb(243 244 246);
}
.account-message-list__date {
  display: block;
  font-size: 0.75rem;
  color: rgb(107 114 128);
  margin-bottom: 0.25rem;
}
.account-message-list__body {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(31 41 55);
  white-space: pre-line;
}
.account-buyer-message-group {
  border: 1px solid rgb(243 244 246);
  border-radius: 0.75rem;
  padding: 1rem 1.125rem;
  background: rgb(255 255 255);
}
.account-buyer-message-group__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: rgb(17 24 39);
}
.account-buyer-message-group__seller {
  margin: 0 0 0.75rem;
}

/* create-listing.php: Frimærketype, Stand, År */
.create-listing-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .create-listing-meta-row {
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
}
.create-listing-meta-row > div {
  min-width: 0;
}

/* create-listing.php: catalog columns: Scott, AFA, Michel, Fischer, Gibbons */
.create-listing-catalog-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .create-listing-catalog-row {
    gap: 0.75rem;
    margin-bottom: 2rem;
  }
}
.create-listing-catalog-row > div {
  min-width: 0;
}
.listing-catalog-fields {
  min-width: 0;
}
.listing-catalog-fields input,
.listing-catalog-fields select {
  background-color: #fff;
}

/* create-listing.php: vertical space before/after Gratis fragt / Acceptér bud */
.create-listing-shipping-checkboxes {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* listing.php: autobid row — matching checkbox size and look (16×16px) */
.listing-autobid-checkbox-native,
.listing-autobid-checkbox-faux {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border-radius: 0.25rem;
  border: 1px solid rgb(209 213 219);
  background-color: #fff;
  box-sizing: border-box;
  vertical-align: middle;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.listing-autobid-checkbox-native {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.listing-autobid-checkbox-faux {
  position: relative;
}
.listing-autobid-checkbox-native:checked {
  background-color: rgb(37 99 235);
  border-color: rgb(37 99 235);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E");
  background-size: 1rem 1rem;
  background-position: center;
  background-repeat: no-repeat;
}
.listing-autobid-checkbox-native:focus-visible {
  outline: 2px solid rgb(59 130 246);
  outline-offset: 2px;
}
.listing-autobid-disable:hover .listing-autobid-checkbox-faux,
.listing-autobid-disable:focus-visible .listing-autobid-checkbox-faux {
  background-color: rgb(37 99 235);
  border-color: rgb(37 99 235);
}
.listing-autobid-disable:hover .listing-autobid-checkbox-faux::after,
.listing-autobid-disable:focus-visible .listing-autobid-checkbox-faux::after {
  content: '';
  position: absolute;
  left: 0.3125rem;
  top: 0.0625rem;
  width: 0.3125rem;
  height: 0.5625rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* create-listing.php: image preview — size + zoom */
.create-listing-thumb-zoom {
  position: relative;
  z-index: 0;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 12rem;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 1 / 1;
  height: auto;
  flex-shrink: 0;
  overflow: hidden;
}
.create-listing-thumb-zoom:hover {
  z-index: 20;
  overflow: visible;
  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.create-listing-thumb-zoom img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.2s ease-out;
  transform-origin: center center;
}
.create-listing-thumb-zoom:hover img {
  transform: scale(1.65);
}

#create-images-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
  overflow: visible;
}
#edit-existing-images-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
  overflow: visible;
}
#create-images-preview > .create-listing-image-card {
  overflow: visible;
  min-width: 0;
}
#edit-existing-images-preview > .create-listing-image-card {
  overflow: visible;
  min-width: 0;
}
@media (max-width: 639px) {
  #create-images-preview {
    grid-template-columns: 1fr;
  }
  #edit-existing-images-preview {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 640px) and (max-width: 1023px) {
  #create-images-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #edit-existing-images-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* listing.php: HipStamp-style gallery — ~460px stage, sort visningsramme, thumbs ~100px, lightbox zoom */
.listing-gallery-hipstamp {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
.listing-main-photo-frame {
  cursor: zoom-in;
  background: #0a0a0a;
  border: 1px solid rgb(39 39 42);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
  /* Fast højde så layout ikke hopper når miniature skifter billede */
  height: min(460px, 70vh);
  min-height: min(460px, 70vh);
}
.listing-main-img-display {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.listing-gallery-thumb {
  cursor: pointer;
  border: 1px solid rgb(212 212 216);
  padding: 0;
  margin: 0;
  line-height: 0;
  vertical-align: top;
  box-sizing: border-box;
}
.listing-gallery-thumb:focus-visible {
  outline: 2px solid rgb(59 130 246);
  outline-offset: 2px;
}
.listing-gallery-thumb-active {
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 2px rgb(59 130 246);
}
.listing-gallery-thumb-img {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
  background: rgb(249 250 251);
}

.listing-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.listing-lightbox.is-open {
  display: flex;
}
.listing-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17 24 39 / 0.88);
  cursor: zoom-out;
}
.listing-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.listing-lightbox-zoom-hint {
  margin: 0;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  color: rgb(209 213 219);
  text-align: center;
  max-width: min(900px, 90vw);
}
@media (max-width: 767px) {
  .listing-lightbox-zoom-hint-desktop {
    display: none;
  }
}
@media (min-width: 768px) {
  .listing-lightbox-zoom-hint-mobile {
    display: none;
  }
}
.listing-lightbox-viewport {
  position: relative;
  width: min(900px, 90vw);
  height: min(75vh, 750px);
  flex-shrink: 0;
  overflow: hidden;
  display: block;
  background: rgb(24 24 27);
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
  touch-action: none;
  user-select: none;
  cursor: default;
}
.listing-lightbox-pan-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Zoom-mod-punkt (JS) bruger translate + scale med origin øverst til venstre */
  transform-origin: 0 0;
  will-change: transform;
}
.listing-lightbox-viewport.can-pan:not(.is-panning) {
  cursor: grab;
}
.listing-lightbox-viewport.is-panning {
  cursor: grabbing;
}
.listing-lightbox-img-el {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.listing-lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 20;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255 255 255 / 0.95);
  color: rgb(17 24 39);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.25);
}
.listing-lightbox-close:hover {
  background: #fff;
}
body.listing-lightbox-open {
  overflow: hidden;
}

/* search.php: filter row — explicit layout (utility sheet does not include every arbitrary class) */
.search-form-controls {
  display: flex;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .search-form-controls {
    display: grid;
    grid-template-columns: minmax(0, 50ch) repeat(3, minmax(9rem, 150px)) auto;
    align-items: stretch;
  }
}
.search-form-controls .search-form-q {
  min-width: 0;
  width: 100%;
  max-width: 50ch;
  box-sizing: border-box;
}
.search-form-controls .search-form-fixed150 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .search-form-controls .search-form-fixed150 {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}
.search-form-controls .search-form-submit {
  width: max-content;
  max-width: 100%;
  align-self: start;
  justify-self: start;
  height: 2.75rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  background-color: #2563eb;
  color: #fff;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .search-form-controls .search-form-submit {
    align-self: center;
  }
}
.search-form-controls .search-form-submit:hover {
  background-color: #1d4ed8;
}

/* search.php: op til 8 kort pr. række på store skærme; små kvadratiske rammer (object-contain) */
.search-page-results {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .search-page-results:not(.search-results-grid--compact) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .search-page-results:not(.search-results-grid--compact) {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
.search-page-results > a {
  min-width: 0;
  padding-top: 0.75rem;
}
.search-page-results > a > div:last-child {
  text-align: center;
}
.search-page-results .search-result-thumb {
  width: 5.5rem;
  height: 5.5rem;
  margin-inline: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  overflow: hidden;
  background-color: #000;
}
.search-page-results .search-result-thumb__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  flex: 0 1 auto;
}
.search-page-results .search-result-thumb > span.text-5xl {
  font-size: 2rem;
  line-height: 1;
  color: rgb(156 163 175);
}

/* search.php: med ?q=… flere kolonner, tættere gap */
.search-results-grid--compact {
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .search-results-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .search-results-grid--compact {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
.search-results-grid--compact > a {
  border-radius: 0.5rem;
}
.search-results-grid--compact > a > div:last-child {
  padding: 0.5rem;
}
.search-results-grid--compact > a h2 {
  font-size: 0.75rem;
  line-height: 1.2rem;
}
.search-results-grid--compact > a .font-bold {
  font-size: 0.75rem;
}

/* Language switch: fixed slot so hover/active does not shift the nav row */
.header-lang-btn {
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 640px) {
  .header-lang-btn {
    min-width: 4.25rem;
  }
}
.header-lang-btn__code {
  display: inline-block;
  min-width: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-currency-wrap {
  -webkit-tap-highlight-color: transparent;
}
.header-currency-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
  letter-spacing: 0.04em;
  padding: 0 1rem 0 0;
  min-width: 3.25rem;
  max-width: 4.5rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 12px;
}
.header-currency-select:focus {
  outline: none;
}
.header-currency-select option {
  color: #111;
  background: #fff;
}

/* Homepage cards: selected currency on top, native in parentheses below */
.display-price-stack {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  line-height: 1.25;
}
.display-price-native {
  font-weight: 500;
}

/* Search + banner share .site-header-align (same width/center as banner image) */
.site-header-align {
  box-sizing: border-box;
  width: min(100%, var(--site-banner-w, 1024px));
  max-width: var(--site-banner-w, 1024px);
  margin-inline: auto;
  position: relative;
}
.header-main-row {
  width: 100%;
  justify-content: flex-start;
}
.header-compact-logo {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 60;
  height: 4rem;
  padding-left: 0;
  -webkit-tap-highlight-color: transparent;
}
.header-compact-logo.opacity-0 {
  display: none;
}
.header-compact-logo.opacity-100 {
  display: flex;
}
/* Sticky header: icon only by default (text only on desktop mouse) */
.header-compact-logo > span {
  display: none;
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .header-compact-logo.opacity-100 > span {
    display: inline;
  }
}
.header-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
}
.header-search-form {
  flex: 0 1 auto;
  width: min(100%, calc(16rem - 15px));
  margin-left: 50px;
}
.header-search-row {
  gap: 0.5rem;
}
.header-mobile-login {
  display: none;
}
.header-search-submit {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  min-height: 3rem;
}
.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  min-height: 3rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
}
.header-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
@media (min-width: 768px) {
  /* .header-icon-btn display overrides Tailwind md:hidden in app.css */
  #mobile-menu-btn {
    display: none;
  }
  #mobile-menu {
    display: none !important;
  }
}
/* Phones: same header in portrait and landscape (logo row + login + search btn) */
@media (max-width: 767px),
  (max-width: 1024px) and (hover: none) and (pointer: coarse),
  (orientation: landscape) and (max-height: 600px) {
  .site-header-banner-wrap .site-banner-brand {
    display: none !important;
  }
  #site-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    max-width: 100%;
  }
  #site-header .header-compact-logo {
    position: static;
    order: 0;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 0.4rem 0.75rem;
    padding-top: max(0.4rem, env(safe-area-inset-top, 0px));
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.5rem;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible;
  }
  #site-header .header-compact-logo > span {
    display: inline !important;
  }
  #site-header .site-header-align {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .header-main-row {
    height: auto;
    min-height: 4rem;
    padding: 0.35rem 0;
  }
  .header-toolbar {
    flex-wrap: nowrap;
    gap: 0.35rem;
    min-width: 0;
    padding-left: 0;
  }
  .header-search-form {
    margin-left: 0;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
  }
  .header-main-row,
  .site-header-align {
    max-width: 100%;
    overflow-x: hidden;
  }
  .header-actions {
    gap: 0.25rem;
    flex-shrink: 0;
    padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
  }
  .header-auth-group {
    display: none;
  }
  .header-search-input {
    display: none;
  }
  .header-mobile-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    height: 3rem;
    min-height: 3rem;
    padding: 0 0.625rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease;
  }
  .header-mobile-login:hover {
    background-color: rgba(255, 255, 255, 0.15);
  }
  .header-currency-wrap {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
  .header-lang-btn {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  #mobile-menu-btn,
  #mobile-menu {
    display: none !important;
  }
  /* Landscape width ≥768px would show nav via md:block — keep it hidden on mobile */
  #site-header > nav[aria-label="Main navigation"] {
    display: none !important;
  }
}
/* Touch phones in landscape (wide viewport, short height) */
@media (orientation: landscape) and (max-width: 1024px) and (max-height: 500px) {
  #site-header > nav[aria-label="Main navigation"] {
    display: none !important;
  }
}
/* JS fallback when touch layout class is applied (portrait + landscape) */
html.layout-phone-header .site-header-banner-wrap .site-banner-brand {
  display: none !important;
}
html.layout-phone-header #site-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
  max-width: 100%;
}
html.layout-phone-header .header-compact-logo {
  position: static;
  order: 0;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  padding: 0.4rem 0.75rem;
  padding-top: max(0.4rem, env(safe-area-inset-top, 0px));
  overflow: visible;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.5rem;
  opacity: 1 !important;
  pointer-events: auto !important;
}
html.layout-phone-header .header-compact-logo > span {
  display: inline !important;
}
html.layout-phone-header #site-header .site-header-align {
  order: 1;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
html.layout-phone-header .header-toolbar {
  padding-left: 0;
}
html.layout-phone-header .header-search-form {
  margin-left: 0;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}
html.layout-phone-header .header-auth-group {
  display: none;
}
html.layout-phone-header .header-search-input {
  display: none;
}
html.layout-phone-header .header-mobile-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  height: 3rem;
  min-height: 3rem;
  padding: 0 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
html.layout-phone-header .header-mobile-login:hover {
  background-color: rgba(255, 255, 255, 0.15);
}
html.layout-phone-header #mobile-menu-btn,
html.layout-phone-header #mobile-menu {
  display: none !important;
}
html.layout-phone-header #site-header > nav[aria-label="Main navigation"] {
  display: none !important;
}
.site-header-banner-wrap {
  width: 100%;
  background-color: #170a07;
  overflow: hidden;
  position: relative;
}
.site-banner-brand {
  position: absolute;
  left: 0;
  top: 1rem;
  z-index: 10;
  padding-left: 1rem;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 640px) {
  .site-banner-brand {
    padding-left: 1.5rem;
  }
}
.site-header-banner__link {
  display: block;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.header-actions .header-currency-wrap,
.header-actions .header-lang-btn,
.header-actions .header-auth-btn,
.header-actions .header-auth-group {
  align-self: center;
}
.header-auth-group {
  flex-shrink: 0;
}
.header-auth-btn {
  flex-shrink: 0;
  text-align: center;
  white-space: nowrap;
}
.header-auth-btn--signin {
  min-width: 5rem;
}
.header-auth-btn--signup {
  min-width: 7.75rem;
}
.header-auth-btn--signout {
  min-width: 5.5rem;
}
@media (min-width: 768px) {
  .header-search-form {
    width: calc(27rem - 15px);
    max-width: min(calc(27rem - 15px), calc(100vw - 18rem));
  }
}

/* Hero banner: same column width as search row */
.site-header-banner {
  display: block;
  width: 100%;
  line-height: 0;
  background-color: #170a07;
}
.site-header-banner__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Country / topic / region nav: grey when no active listings, white when listings exist */
.nav-country-link--has-items,
.nav-topic-link--has-items,
.nav-region-link--has-items {
  color: #fff;
}
.nav-country-link--has-items:hover,
.nav-topic-link--has-items:hover,
.nav-region-link--has-items:hover {
  color: #fff;
  background-color: rgb(255 255 255 / 0.1);
}
.nav-country-link--empty,
.nav-topic-link--empty,
.nav-region-link--empty {
  color: rgb(255 255 255 / 0.4);
}
#site-header .nav-country-link--empty:hover,
#site-header .nav-topic-link--empty:hover,
#site-header .nav-region-link--empty:hover,
.nav-country-link--empty:hover,
.nav-topic-link--empty:hover,
.nav-region-link--empty:hover {
  color: rgb(255 255 255 / 0.42);
  background-color: rgb(255 255 255 / 0.04);
}
/* Browse picker: no white flash — stay muted vs categories with listings */
#site-header .nav-browse-panel__list .nav-country-link--empty:hover,
#site-header .nav-browse-panel__list .nav-topic-link--empty:hover,
#site-header .nav-browse-panel__list .nav-region-link--empty:hover {
  color: rgb(255 255 255 / 0.4);
  background-color: rgb(255 255 255 / 0.03);
}
.nav-country-link--active,
.nav-topic-link--active,
.nav-region-link--active {
  background-color: rgb(255 255 255 / 0.15);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25);
}

/* Browse stamps dropdown (regions | categories | countries) */
.nav-browse-menu {
  position: relative;
}
.nav-browse-toggle__chevron {
  transition: transform 0.15s ease;
}
.nav-browse-toggle[aria-expanded="true"] .nav-browse-toggle__chevron {
  transform: rotate(180deg);
}
.nav-browse-panel {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  z-index: 80;
  width: min(calc(100vw - 2rem), 56rem);
  max-height: min(70vh, 24rem);
  overflow: auto;
  background-color: #170a07;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 0.5rem;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.45);
}
.nav-browse-panel.hidden {
  display: none;
}
.nav-browse-panel:not(.hidden) {
  display: block;
}
.nav-browse-panel__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.nav-browse-panel__col {
  min-width: 0;
  padding: 0.75rem 0.625rem;
  border-right: 1px solid rgb(255 255 255 / 0.12);
}
.nav-browse-panel__col:last-child {
  border-right: none;
}
.nav-browse-panel__heading {
  margin: 0 0 0.5rem;
  padding: 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.55);
}
.nav-browse-panel__list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: min(60vh, 20rem);
  overflow-y: auto;
}
.nav-browse-panel__list a {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-browse-panel-mobile.hidden {
  display: none;
}
.nav-browse-panel-mobile:not(.hidden) .nav-browse-panel__grid {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.nav-browse-panel-mobile .nav-browse-panel__col {
  border-right: none;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
  padding: 0.5rem 0.25rem 0.75rem;
}
.nav-browse-panel-mobile .nav-browse-panel__col:last-child {
  border-bottom: none;
}
.nav-browse-panel-mobile .nav-browse-panel__list {
  max-height: 12rem;
}

/* header: kategori-karrusel (DB-kategorier, ikke “lande”-etiket) */
.nav-categories-carousel {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 0%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.nav-categories-carousel::-webkit-scrollbar {
  display: none;
}
.nav-carousel-btn {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(255 255 255 / 0.06);
  color: rgb(255 255 255 / 0.85);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-carousel-btn:hover {
  background: rgb(255 255 255 / 0.12);
  color: #fff;
}
.nav-carousel-btn--mobile {
  width: 2.25rem;
  height: 2.25rem;
}

/* listing.php: Køb nu — green hover (not gray/white) */
.listing-buy-now-btn {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.listing-buy-now-btn:hover {
  background-color: rgb(22 163 74);
  border-color: rgb(22 163 74);
  color: #fff;
}

/* listing.php: ønskeliste toggle */
.listing-wishlist-btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(209 213 219);
  background-color: #fff;
  color: rgb(17 24 39);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.listing-wishlist-btn:hover {
  background-color: rgb(243 244 246);
  border-color: rgb(209 213 219);
  color: rgb(17 24 39);
}
.listing-wishlist-btn.is-on-wishlist {
  border-color: rgb(245 158 11);
  background-color: rgb(254 243 199);
  color: rgb(146 64 14);
}
.listing-wishlist-btn.is-on-wishlist:hover {
  background-color: rgb(253 230 138);
  border-color: rgb(217 119 6);
  color: rgb(120 53 15);
}

/* header: ønskeliste — amber text only when wishlist has items */
#site-header .header-wishlist-link--active,
#site-header .header-wishlist-link--active:visited,
#site-header .header-wishlist-link--active:hover,
#site-header .header-wishlist-link--active:focus-visible {
  color: rgb(253 230 138) !important;
  background-color: transparent;
}

#site-header .header-messages-link--active,
#site-header .header-messages-link--active:visited,
#site-header .header-messages-link--active:hover,
#site-header .header-messages-link--active:focus-visible {
  color: rgb(253 230 138) !important;
  background-color: transparent;
}

/* wishlist.php, cart.php, messages.php — shared empty state */
.user-page {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1rem;
}
@media (min-width: 640px) {
  .user-page {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
.user-page__title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgb(17 24 39);
}
.page-empty-state {
  border: 1px solid rgb(229 231 235);
  border-radius: 0.5rem;
  background: rgb(255 255 255);
  padding: 2rem 1rem;
  text-align: center;
}
.page-empty-state p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(75 85 99);
}

/* messages.php — DBA-style inbox (compact) */
.messages-inbox {
  display: grid;
  grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
  max-height: 24rem;
  border: 1px solid rgb(229 231 235);
  border-radius: 0.625rem;
  background: rgb(255 255 255);
  overflow: hidden;
}
.messages-inbox__list {
  border-right: 1px solid rgb(243 244 246);
  background: rgb(249 250 251);
  min-height: 0;
  overflow: hidden;
}
.messages-inbox__list-inner {
  max-height: 24rem;
  overflow-y: auto;
}
.messages-inbox-item-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid rgb(243 244 246);
  transition: background-color 0.15s ease;
  cursor: pointer;
}
.messages-inbox-item-row:hover {
  background: rgb(243 244 246);
}
.messages-inbox-item-row.is-active {
  box-shadow: inset 3px 0 0 rgb(37 99 235);
  background: rgb(255 255 255);
}
.messages-inbox-item-row.is-active:hover {
  background: rgb(255 255 255);
}
.messages-inbox-item-row--unread:not(.is-active) {
  background: rgb(239 246 255);
}
.messages-inbox-item-row--unread:not(.is-active):hover {
  background: rgb(219 234 254);
}
.messages-inbox-item__select {
  display: flex;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem 0.35rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.messages-inbox-item__delete {
  margin: 0 0 0.45rem 3rem;
  padding: 0;
  cursor: default;
}
.messages-inbox-item__delete-btn {
  border: none;
  border-radius: 0.25rem;
  background: rgb(236 72 153);
  color: rgb(255 255 255);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.messages-inbox-item__delete-btn:hover {
  background: rgb(219 39 119);
  color: rgb(255 255 255);
  text-decoration: none;
}
.messages-inbox-item-row--unread:not(.is-active) .messages-inbox-item__title {
  font-weight: 700;
}
.messages-inbox-item-row--unread:not(.is-active) .messages-inbox-item__preview {
  color: rgb(55 65 81);
  font-weight: 500;
}
.messages-inbox-item__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  border: 1px solid rgb(229 231 235);
  background: rgb(255 255 255);
  overflow: hidden;
}
.messages-inbox-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  flex: 1 1 auto;
  min-width: 0;
}
.messages-inbox-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
}
.messages-inbox-item__title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(17 24 39);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.messages-inbox-item__date {
  flex-shrink: 0;
  font-size: 0.625rem;
  color: rgb(107 114 128);
}
.messages-inbox-item__party {
  font-size: 0.75rem;
  color: rgb(75 85 99);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.messages-inbox-item__preview {
  font-size: 0.75rem;
  color: rgb(107 114 128);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.messages-inbox__detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  max-height: 24rem;
  overflow: hidden;
}
.messages-detail-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 24rem;
  overflow: hidden;
}
.messages-detail-panel[hidden] {
  display: none !important;
}
.messages-inbox__mobile-bar {
  display: none;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgb(243 244 246);
  background: rgb(249 250 251);
}
.messages-inbox__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  padding: 1rem;
}
.messages-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 24rem;
  overflow: hidden;
}
.messages-detail__listing {
  display: flex;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid rgb(243 244 246);
  background: rgb(255 255 255);
  flex-shrink: 0;
}
.messages-detail__delete {
  margin: 0;
}
.messages-detail__delete-btn {
  border: 1px solid rgb(229 231 235);
  border-radius: 0.375rem;
  background: rgb(255 255 255);
  color: rgb(107 114 128);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}
.messages-detail__delete-btn:hover {
  border-color: rgb(252 165 165);
  background: rgb(254 242 242);
  color: rgb(185 28 28);
}
.messages-detail__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.375rem;
  border: 1px solid rgb(243 244 246);
  background: rgb(249 250 251);
  overflow: hidden;
}
.messages-detail__title {
  margin: 0 0 0.15rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgb(17 24 39);
  line-height: 1.3;
}
.messages-detail__price,
.messages-detail__party {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
}
.messages-detail__reply-link {
  display: inline-block;
  margin-top: 0.25rem;
}
.messages-detail__thread {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.625rem 0.75rem;
  background: rgb(249 250 251);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
}
.messages-detail__compose {
  border-top: 1px solid rgb(229 231 235);
  background: rgb(255 255 255);
  padding: 0.5rem 0.75rem 0.625rem;
  flex-shrink: 0;
}
.messages-detail__compose-input {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  max-height: 6rem;
  resize: vertical;
  border: 1px solid rgb(209 213 219);
  border-radius: 0.375rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: rgb(17 24 39);
  background: rgb(255 255 255);
}
.messages-detail__compose-input:focus {
  outline: 2px solid rgb(59 130 246);
  outline-offset: 1px;
  border-color: rgb(59 130 246);
}
.messages-detail__compose-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.4rem;
}
.messages-detail__compose-btn {
  border: none;
  border-radius: 0.375rem;
  background: rgb(37 99 235);
  color: rgb(255 255 255);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}
.messages-detail__compose-btn:hover {
  background: rgb(29 78 216);
}
.messages-bubble {
  max-width: min(100%, 28rem);
}
.messages-bubble--mine {
  align-self: flex-end;
  text-align: right;
}
.messages-bubble--theirs {
  align-self: flex-start;
  text-align: left;
}
.messages-bubble__date {
  display: block;
  font-size: 0.625rem;
  color: rgb(107 114 128);
  margin-bottom: 0.1rem;
}
.messages-bubble__body {
  display: inline-block;
  padding: 0.45rem 0.65rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  white-space: pre-line;
  text-align: left;
}
.messages-bubble--mine .messages-bubble__body {
  background: rgb(219 234 254);
  color: rgb(30 58 138);
}
.messages-bubble--theirs .messages-bubble__body {
  background: rgb(255 255 255);
  border: 1px solid rgb(229 231 235);
  color: rgb(31 41 55);
}
@media (max-width: 767px) {
  .messages-inbox {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .messages-inbox__list-inner {
    max-height: none;
  }
  .messages-inbox__detail,
  .messages-detail {
    max-height: none;
  }
  .messages-inbox--mobile-detail .messages-inbox__list {
    display: none;
  }
  .messages-inbox:not(.messages-inbox--mobile-detail) .messages-inbox__detail {
    display: none;
  }
  .messages-inbox--mobile-detail .messages-inbox__mobile-bar {
    display: block;
  }
  .messages-inbox__placeholder {
    display: none;
  }
}

.account-toolbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: rgb(245 158 11);
  color: rgb(255 255 255);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

/* listing.php: Seneste bud — width follows content (w-fit not in app.css bundle) */
.listing-recent-bids {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}
.listing-recent-bids-table {
  width: auto;
  border-collapse: collapse;
  border: 1px solid #f3f4f6;
  border-radius: 0.75rem;
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.listing-recent-bids-table tbody tr + tr td {
  border-top: 1px solid #f3f4f6;
}
.listing-recent-bids-table td {
  padding: 0.625rem 1rem;
  vertical-align: top;
}
.listing-recent-bids-table td.listing-recent-bids-amount {
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  text-align: right;
  padding-left: 1.25rem;
}
.listing-recent-bids-table .listing-recent-bids-bidder {
  color: #1f2937;
}
.listing-recent-bids-table .listing-recent-bids-date {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: #6b7280;
}

/* admin-catalog.php: compact layout — forms + tables fit content */
.admin-catalog-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
}
.admin-catalog-form-panel {
  width: fit-content;
  max-width: 100%;
  flex: 0 0 auto;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.admin-catalog-form-panel h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.75rem;
}
.admin-catalog-form-panel hr {
  margin: 1rem 0;
  border-color: #f3f4f6;
}
.admin-catalog-form-panel .admin-catalog-hint {
  font-size: 0.8125rem;
  line-height: 1.25rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  padding: 0.5rem 0.625rem;
  margin-bottom: 0.75rem;
  max-width: 18rem;
}
.admin-catalog-form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 18rem;
  max-width: 100%;
}
.admin-catalog-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}
.admin-catalog-form input[type="text"],
.admin-catalog-form input[type="email"],
.admin-catalog-form input[type="url"],
.admin-catalog-form input[type="number"],
.admin-catalog-form select,
.admin-catalog-form textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.admin-catalog-form textarea {
  resize: vertical;
  min-height: 2.5rem;
}
.admin-catalog-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.admin-catalog-form-actions .admin-catalog-btn-primary,
.admin-catalog-form > .admin-catalog-btn-primary {
  border-radius: 0.5rem;
  background: #2563eb;
  color: #fff;
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.admin-catalog-form-actions .admin-catalog-btn-primary:hover,
.admin-catalog-form > .admin-catalog-btn-primary:hover {
  background: #1d4ed8;
}
.admin-catalog-form-actions .admin-catalog-btn-secondary {
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  color: #374151;
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.admin-catalog-form-actions .admin-catalog-btn-secondary:hover {
  background: #f9fafb;
}
.admin-catalog-table-panel {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
}
.admin-catalog-table-panel > h2 {
  padding: 1rem 1.25rem 0;
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}
.admin-catalog-table-wrap--regions {
  max-height: 480px;
}
.admin-catalog-table-wrap {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 560px;
  padding: 0 1.25rem 1rem;
}
.admin-catalog-table {
  width: auto;
  table-layout: auto;
  border-collapse: collapse;
}
.admin-catalog-table .admin-catalog-col-actions {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 5.75rem;
  min-width: 5.75rem;
  max-width: 5.75rem;
  vertical-align: top;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  background: #fff;
  box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.12);
}
.admin-catalog-table thead .admin-catalog-col-actions {
  z-index: 3;
  background: #f9fafb;
}
.admin-catalog-table tr.bg-blue-50 .admin-catalog-col-actions {
  background: #eff6ff;
}
.admin-catalog-table tr.bg-amber-50 .admin-catalog-col-actions {
  background: #fffbeb;
}
.admin-catalog-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
.admin-catalog-row-actions a,
.admin-catalog-row-actions button {
  font-size: 0.75rem;
  line-height: 1.125rem;
  font-weight: 500;
}
.admin-catalog-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  background: #fff;
  color: #374151;
  font-size: 0.625rem;
  line-height: 1;
  cursor: pointer;
}
.admin-catalog-sort-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.admin-catalog-sort-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* admin-recent-visits.php: compact table fits viewport width */
.admin-visits-page {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.admin-visits-toolbar {
  width: 100%;
  min-width: 0;
}
.admin-visits-table {
  table-layout: fixed;
  border-collapse: collapse;
}
.admin-visits-table th,
.admin-visits-table td {
  padding: 0.35rem 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}
.admin-visits-col-time {
  width: 6.75rem;
}
.admin-visits-col-country {
  width: 2.25rem;
}
.admin-visits-col-ip {
  width: 5.75rem;
}
.admin-visits-table .admin-visits-col-client {
  width: 5.5rem;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}
.admin-visits-client-cell {
  font-weight: 500;
}
.admin-visits-client--bot {
  color: #7c3aed;
}
.admin-visits-client--tool {
  color: #b45309;
}
.admin-visits-table .admin-visits-col-path,
.admin-visits-table .admin-visits-col-user,
.admin-visits-table .admin-visits-col-ref {
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}
.admin-visits-table .admin-visits-col-path {
  width: 24%;
}
.admin-visits-table .admin-visits-col-user {
  width: 14%;
}
.admin-visits-table .admin-visits-col-ref {
  width: 16%;
}

.admin-catalog-table .admin-catalog-col-id {
  width: 3rem;
}
.admin-catalog-table .admin-catalog-col-name {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-catalog-table .admin-catalog-col-region {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-catalog-table .admin-catalog-col-count {
  width: 3.5rem;
  text-align: right;
}
.admin-catalog-table .admin-catalog-col-email {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-catalog-name-sub {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-catalog-bilingual-readonly {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #f9fafb;
  color: #111827;
  font-size: 0.875rem;
  line-height: 1.4;
}
.admin-catalog-sort-th a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.admin-catalog-sort-th a:hover {
  color: #2563eb;
}
.admin-catalog-sort-th.is-active a {
  font-weight: 600;
  color: #1d4ed8;
}
.admin-catalog-sort-indicator {
  font-size: 0.625rem;
  margin-left: 0.125rem;
}

/* login / register: password show-hide toggle */
.password-field {
  position: relative;
}
.password-field__input {
  padding-right: 2.75rem;
}
.password-field__toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: rgb(107 114 128);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.password-field__toggle:hover,
.password-field__toggle:focus,
.password-field__toggle:focus-visible,
.password-field__toggle:active {
  background: none;
  box-shadow: none;
  outline: none;
  color: rgb(55 65 81);
}
.password-field__icon.hidden {
  display: none;
}
