/* ── Truva Catalogue Ads – Custom Styles ─────────────────────────── */

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0b0e14; }
::-webkit-scrollbar-thumb { background: #2a3040; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #FF5A1F; }

/* Sidebar tab buttons */
.tab-btn {
  color: #8892a0;
  transition: color .15s, background .15s;
}
.tab-btn.active {
  background: #FF5A1F;
  color: #fff;
  box-shadow: 0 2px 12px rgba(255,90,31,.35);
}
.tab-btn:hover:not(.active) { color: #fff; background: rgba(255,255,255,.06); }

/* Tab content visibility */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── ARTBOARD ─────────────────────────────────────────────────────── */
#cat-artboard {
  background: #111;
  box-shadow: 0 32px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);
  border-radius: 4px;
  transition: width .3s ease, height .3s ease;
}

/* Aspect ratios */
#cat-artboard.ratio-1-1   { width: 540px; height: 540px; }
#cat-artboard.ratio-4-5   { width: 432px; height: 540px; }
#cat-artboard.ratio-5-4   { width: 540px; height: 432px; }
#cat-artboard.ratio-9-16  { width: 304px; height: 540px; }

@media (max-width: 900px) {
  #cat-artboard.ratio-1-1  { width: 320px; height: 320px; }
  #cat-artboard.ratio-4-5  { width: 256px; height: 320px; }
  #cat-artboard.ratio-5-4  { width: 320px; height: 256px; }
  #cat-artboard.ratio-9-16 { width: 180px; height: 320px; }
}

/* ── CARD LAYERS ──────────────────────────────────────────────────── */
.card-photo {
  position: absolute; inset: 0;
  overflow: hidden;
  background: #111;
}
.card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* bottom gradient info bar */
.card-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.65) 35%, rgba(0,0,0,0.25) 65%, rgba(0,0,0,0) 100%);
  padding: 120px 0 24px 0;
  display: flex;
  flex-direction: column;
}
.card-bar-content-wrap {
  position: relative;
  /* Removed padding-bottom so it tightly wraps the text */
}
.card-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 12px;
  background: #FF5A1F;
}
.card-bar-inner {
  padding: 0 24px 0 28px; /* 12px accent + 16px gap */
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card-bar-subtitle {
  font-size: 17px;
  font-weight: 500; /* Medium */
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.card-bar-title {
  font-size: 36px;
  font-weight: 600; /* Semi-bold */
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 2px 0 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.card-bar-meta {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 14px;
  font-weight: 500; /* Medium */
  color: #ffffff;
  flex-wrap: nowrap;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Make text editable directly on canvas */
[contenteditable="true"] {
  outline: none;
  cursor: text;
  border-radius: 4px;
  transition: background 0.15s, box-shadow 0.15s;
}
[contenteditable="true"]:hover {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.15);
}
[contenteditable="true"]:focus {
  background: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.25);
}
.card-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.card-meta-sep {
  width: 1px; height: 18px;
  background: rgba(255,255,255,0.6);
  margin: 0 16px;
  flex-shrink: 0;
}
.card-meta-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 1;
}

/* Truva logo top-right */
.card-logo {
  position: absolute;
  top: 0; right: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
}
.card-logo svg, .card-logo img {
  height: 22px;
  width: auto;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.5));
}

/* ── RANGE SLIDERS ──────────────────────────────────────────────────*/
input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #2a3040;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #FF5A1F;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255,90,31,.25);
  transition: box-shadow .15s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(255,90,31,.35);
}

/* ── GRID CARDS (multi-asset overview) ──────────────────────────── */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.catalogue-card {
  background: #1a1e28;
  border: 1px solid #232838;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.catalogue-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  border-color: #FF5A1F;
}
.catalogue-card.selected {
  border-color: #FF5A1F;
  box-shadow: 0 0 0 2px rgba(255,90,31,.4);
}
.catalogue-card-thumb {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #111;
}
.catalogue-card-info {
  padding: 10px 12px 12px;
}
.catalogue-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 2px;
}
.catalogue-card-sub {
  font-size: 11px;
  color: #8892a0;
  margin-bottom: 6px;
}
.catalogue-card-price {
  font-size: 13px;
  font-weight: 800;
  color: #FF5A1F;
}

/* Toast */
#toast-container {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  padding: 10px 18px;
  background: #1e2432;
  border: 1px solid rgba(255,255,255,.12);
  border-left: 3px solid #FF5A1F;
  border-radius: 10px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: toast-in .25s ease;
  max-width: 340px;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast.out {
  animation: toast-out .3s ease forwards;
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin .7s linear infinite; }

/* Export button loading state */
.btn-loading { opacity: .7; pointer-events: none; }

/* Ratio buttons */
.ratio-btn {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #8892a0;
  transition: background .15s, color .15s;
  display: flex; align-items: center; gap: 5px;
}
.ratio-btn.active {
  background: #FF5A1F;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,90,31,.35);
}
.ratio-btn:hover:not(.active) { color: #fff; background: rgba(255,255,255,.08); }

/* Property search dropdown */
#cat-property-dropdown {
  scrollbar-width: thin;
  scrollbar-color: #2a3040 transparent;
}
