﻿@keyframes img-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.image-skeleton {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, #f3f4f6 15%, #e5e7eb 35%, #f3f4f6 55%);
  background-size: 220% 220%;
  animation: img-shimmer 1.05s ease-in-out infinite;
  pointer-events: none;
}

.image-shell {
  position: relative;
  display: block;
  line-height: 0;
}

.image-shell > img {
  display: block;
}

/* Modern brand header */
.brand-badge {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #111827);
  display: grid;
  place-items: center;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.brand-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.45), transparent 55%);
  opacity: 0.9;
}

.brand-initials {
  position: relative;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: #22c55e;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-title {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.brand-tagline {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

/* Ad card */
.ad-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ad-card.no-art {
  grid-template-columns: 1fr;
}

.ad-card.ad-preview {
  pointer-events: none;
}

.ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.24);
}

.ad-card:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.4);
  outline-offset: 4px;
  box-shadow: 0 24px 50px rgba(99, 102, 241, 0.35);
}

.ad-card__content {
  display: grid;
  gap: 8px;
  align-content: center;
}

.ad-card__tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.72);
}

.ad-card__title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ad-card__subtitle {
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.78);
}

.ad-card__ctaRow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f172a;
}

.ad-card__cta {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.ad-card__arrow {
  font-size: 0.9rem;
}

.ad-card__art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-card__art .image-shell {
  width: 100%;
  max-height: 160px;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.ad-card__art img {
  width: 100%;
  height: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 16px;
}


/* Modern button system */
:root {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-contrast: #f8fafc;
  --btn-radius: 14px;
}

/* Toggle control */
.toggle-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.toggle-card[data-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
}

.listing-queue-toast {
  position: fixed;
  top: 140px;
  right: 16px;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.28s ease, opacity 0.28s ease;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  opacity: 0;
  z-index: 2000;
  pointer-events: none;
}

.listing-queue-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.listing-queue-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #22c55e;
  color: #0f172a;
  font-weight: 700;
  font-size: 14px;
}

.listing-queue-toast__text {
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

.toggle-card .toggle-copy {
  display: grid;
  gap: 2px;
}

.inquiry-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  color: #9f1239;
  background: linear-gradient(135deg, #fde68a 0%, #fbcfe8 100%);
  border: 1px solid rgba(219, 39, 119, 0.35);
  box-shadow: 0 6px 16px rgba(248, 113, 113, 0.25);
  letter-spacing: 0.2px;
}

.card .listing-description {
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #d1d5db;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.toggle-input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle-input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-card[data-disabled="true"] .toggle-input:checked + .toggle-slider {
  background: #9ca3af;
}

.toggle-card .toggle-slider:focus-visible,
.toggle-input:focus-visible + .toggle-slider {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--btn-radius);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #0f172a;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  min-height: 0;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn.primary {
  background: linear-gradient(135deg, #2563eb 0%, #4338ca 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.32);
}

.btn.primary:hover:not(:disabled) {
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.36);
}

.btn.primary:focus-visible {
  outline-color: rgba(99, 102, 241, 0.55);
}

.btn.primary:disabled {
  background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: none;
}

.btn.danger {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 30px rgba(248, 113, 113, 0.28);
}

.btn.danger:hover:not(:disabled) {
  box-shadow: 0 18px 36px rgba(248, 113, 113, 0.32);
}

.btn.danger:focus-visible {
  outline-color: rgba(239, 68, 68, 0.55);
}

.btn.danger:disabled {
  background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: none;
}

/* Global status banner */
.global-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #991b1b;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px auto;
  width: min(960px, calc(100% - 32px));
  padding: 12px 16px;
  box-shadow: 0 6px 24px rgba(185, 28, 28, 0.12);
}
.banner-text {
  flex: 1;
  font-weight: 600;
}
.banner-dismiss {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
}
.banner-dismiss:hover {
  background: rgba(185, 28, 28, 0.12);
}

.banner-dismiss:focus-visible {
  background: rgba(185, 28, 28, 0.18);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Listing modal (all devices) */
.modal-inner.listing-modal {
  background: #fff;
  width: min(92vw, 720px);
  max-height: 90vh;
  overflow: auto;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
}

/* Make the card behave like a normal sheet inside the modal */
.modal-inner.listing-modal .card { width: 100%; overflow: hidden; box-shadow: none; }

/* Keep the hero image contained */
.modal-inner.listing-modal .aspect {
  position: relative;
  padding-top: 56%;
  margin-bottom: 12px;
}
.modal-inner.listing-modal .aspect .image-shell {
  position: absolute;
  inset: 0;
}
.modal-inner.listing-modal .aspect img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Padding for the text/buttons area */
.modal-inner.listing-modal .card > div:last-child {
  position: relative;
  z-index: 1;
  padding: 16px;
}
/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  backdrop-filter: blur(2px);
}

@media (max-width: 640px) {
  .lightbox-overlay {
    padding: 32px 12px;
  }
}

.lightbox-content {
  position: relative;
  width: min(100vw, 960px);
  max-width: 100vw;
  max-height: calc(100vh - 160px);
  background: rgba(17, 24, 39, 0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  box-sizing: border-box;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.55);
}

.lightbox-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.lightbox-footer {
  width: 100%;
  display: flex;
  justify-content: center;
}


@media (max-width: 640px) {
  .lightbox-content {
    width: 100vw;
    max-height: calc(100vh - 96px);
    padding: 16px;
    gap: 10px;
    border-radius: 14px;
  }
}

.flagged-detail-button {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  text-align: left;
  width: 100%;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  color: #111;
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.flagged-detail-button:hover,
.flagged-detail-button:focus-visible {
  border-color: #94a3b8;
  background: #f1f5f9;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  outline: none;
}

.flagged-detail-type {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1f2937;
}

.flagged-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flagged-tag {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.flagged-detail-preview {
  font-size: 12px;
  color: #4b5563;
}

.lightbox-stage {
  position: relative;
  width: 100%;
  flex: 0 1 auto;
  max-height: calc(100vh - 280px);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 14px;
  padding: 12px;
}

.lightbox-stage-skeleton {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.28) 0%, rgba(71, 85, 105, 0.45) 50%, rgba(148, 163, 184, 0.28) 100%);
  background-size: 240% 240%;
  animation: img-shimmer 1.1s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.lightbox-main {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-main .image-shell {
  width: 100%;
  display: flex;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
}

.lightbox-main .image-shell .image-skeleton {
  border-radius: inherit;
}


.lightbox-img {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 320px);
  max-width: 100%;
  min-height: 120px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

@media (max-width: 640px) {
  .lightbox-img {
    max-height: calc(100vh - 210px);
    min-height: 100px;
    border-radius: 10px;
  }

  .lightbox-main .image-shell {
    border-radius: 10px;
  }
}

.lightbox-empty {
  min-height: 200px;
  min-width: 220px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #d1d5db;
  font-size: 15px;
  text-align: center;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: none;
  background: rgba(17, 24, 39, 0.7);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-arrow.left { left: 12px; }
.lightbox-arrow.right { right: 12px; }
.lightbox-arrow:disabled { opacity: 0.4; cursor: default; }

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: none;
  background: rgba(17, 24, 39, 0.7);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}


.lightbox-counter {
  position: absolute;
  top: 12px;
  left: 16px;
  padding: 4px 12px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  pointer-events: none;
}

.lightbox-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 12px;
  width: 100%;
  justify-content: center;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 12px;
}

.lightbox-thumbs.loading {
  justify-content: flex-start;
  background: rgba(0, 0, 0, 0.28);
}

.lightbox-thumbs::-webkit-scrollbar {
  height: 6px;
}

.lightbox-thumb-skeleton {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.28) 0%, rgba(71, 85, 105, 0.42) 50%, rgba(148, 163, 184, 0.28) 100%);
  background-size: 220% 220%;
  animation: img-shimmer 1.1s ease-in-out infinite;
  pointer-events: none;
}

.lightbox-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  opacity: 0.6;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.lightbox-thumbs .image-shell {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.lightbox-thumbs img:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.lightbox-thumbs img.active {
  opacity: 1;
  border-color: #3b82f6;
}

.lightbox-thumbs.empty {
  height: 64px;
  align-items: center;
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  pointer-events: none;
}

.lightbox-thumbs.empty span {
  opacity: 0.75;
}

.message-toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 8px;
  z-index: 1200;
  max-width: min(360px, calc(100vw - 48px));
}

.message-toast {
  background: rgba(17, 24, 39, 0.94);
  color: #f9fafb;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  outline: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.message-toast:focus,
.message-toast:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.4);
}

.message-toast__title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: #f9fafb;
}

.message-toast__preview {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(249, 250, 251, 0.85);
}

@media (max-width: 640px) {
  .message-toast-container {
    right: 16px;
    bottom: 16px;
    max-width: calc(100vw - 32px);
  }
}


.lightbox-info {
  font-size: 12px;
  color: #d1d5db;
  text-align: center;
}
@media (max-width: 640px) {
  .lightbox-thumbs img {
    width: 56px;
    height: 56px;
  }

  .lightbox-thumbs .image-shell {
    width: 56px;
    height: 56px;
  }

  .lightbox-thumb-skeleton {
    width: 56px;
    height: 56px;
  }
}
