/* ShowroomAI additions on top of the base theme (assets/css/styles.css). Uses the theme's own
   Bootstrap variables so light/dark mode keep working. */

/* The theme sizes every .card to its column's full height (--bs-card-height: calc(100% - gutter)),
   which assumes one card per column. Columns that stack several cards (or hold a sticky card)
   opt out with .card-stack so each card is only as tall as its content. */
.card-stack > .card { --bs-card-height: auto; }

/* Sign-in / create-account cover panel with a photo (ShowroomAi:LoginCoverImage). The inline
   background stacks the theme's blue shapes over a dark fade over the photo; here every layer
   fills the panel, and the heading sits at the bottom in white over the fade. */
.auth-cover-wrapper .auth-cover.auth-cover-photo {
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat;
  align-items: flex-end;
  text-align: left;
}
.auth-cover-wrapper .auth-cover.auth-cover-photo .auth-content {
  margin-left: 0;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
.auth-cover-wrapper .auth-cover.auth-cover-photo .auth-content h1 { color: #fff; }
.auth-cover-wrapper .auth-cover.auth-cover-photo .auth-content p { color: #fff; opacity: .85; }

/* Read-only standard prompt wording (see _SpecialRequirements / Admin → AI Prompts) */
.standard-wording-text {
  font-size: .8rem;
  line-height: 1.55;
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  padding: .75rem .9rem;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* UK-style number plate */
.reg-plate {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  letter-spacing: .06em;
  color: #111;
  background: #f7d117;
  border: 2px solid #111;
  border-radius: .35rem;
  /* Yellow margin all round the blue UK band, as on a real plate — in em so it scales with
     the -sm / -lg sizes. */
  padding: .15em .55em .15em .15em;
  line-height: 1.5;
  white-space: nowrap;
  text-transform: uppercase;
}
.reg-plate::before {
  content: "UK";
  align-self: stretch;
  display: flex;
  align-items: center;
  font-size: .55em;
  font-weight: 700;
  color: #fff;
  background: #1f4db8;
  padding: 0 .3rem;
  border-radius: .2rem;
}
.reg-plate.reg-plate-lg { font-size: 1.5rem; }
.reg-plate.reg-plate-sm { font-size: .8rem; }

.reg-plate-input {
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background-color: #f7d117 !important;
  color: #111 !important;
  border: 2px solid #111 !important;
  font-size: 1.35rem;
  text-align: center;
}
.reg-plate-input::placeholder { color: rgba(0, 0, 0, .35); }

/* Upload drop zone */
.upload-dropzone {
  border: 2px dashed var(--bs-border-color);
  border-radius: 1rem;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
  background: var(--bs-tertiary-bg);
}
.upload-dropzone:hover,
.upload-dropzone.is-dragover {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), .05);
}
.upload-dropzone .upload-icon {
  font-size: 2.5rem;
  color: var(--bs-primary);
  line-height: 1;
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .75rem;
}
.upload-preview-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: .75rem;
  overflow: hidden;
  background: var(--bs-tertiary-bg);
}
.upload-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview-item .btn-remove {
  position: absolute;
  top: .35rem;
  right: .35rem;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
}

/* Exterior / Interior marker on upload previews and original-photo tiles */
.photo-type-toggle {
  position: absolute;
  left: .35rem;
  bottom: .35rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.photo-type-toggle .btn { font-size: .68rem; padding: .15rem .45rem; line-height: 1.3; }
.image-tile .photo-type-toggle { left: .5rem; bottom: .5rem; }

/* Per-photo wording button (New Generation previews and original-photo tiles). Highlighted when
   the photo has wording saved; the wording itself shows as the tooltip. */
.btn-photo-wording {
  position: absolute;
  top: .35rem;
  left: .35rem;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.image-tile .btn-photo-wording { top: .3rem; left: 2.25rem; }
.image-tile .btn-photo-wording.is-first { left: .5rem; } /* no select checkbox beside it */

/* Pages use the full width (container-fluid), so add a breakpoint above Bootstrap's xxl (1400px)
   for very wide screens — vehicle card grids go to six per row rather than stretching. */
@media (min-width: 1800px) {
  .col-3xl-2 { flex: 0 0 auto; width: 16.66666667%; }
}

/* Credit Usage: small thumbnails of what each request generated (click for full size) */
.usage-thumb {
  width: 64px;
  height: 36px;
  object-fit: cover;
  border-radius: .35rem;
  cursor: zoom-in;
  background: var(--bs-tertiary-bg);
}

/* Vehicle and image cards */
.vehicle-card-cover {
  aspect-ratio: 16 / 9;
  background: var(--bs-tertiary-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vehicle-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.vehicle-card:hover .vehicle-card-cover img { transform: scale(1.03); }
.vehicle-card-cover .placeholder-icon { font-size: 2.5rem; color: var(--bs-secondary-color); }

.image-tile {
  position: relative;
  border-radius: .75rem;
  overflow: hidden;
  background: var(--bs-tertiary-bg);
}
.image-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; cursor: zoom-in; }
.image-tile.image-tile-original img { aspect-ratio: 4 / 3; }
.image-tile .image-tile-actions {
  position: absolute;
  inset: auto .5rem .5rem auto;
  display: flex;
  gap: .35rem;
  opacity: 0;
  transition: opacity .15s;
}
.image-tile:hover .image-tile-actions,
.image-tile:focus-within .image-tile-actions { opacity: 1; }
@media (hover: none) { .image-tile .image-tile-actions { opacity: 1; } }
.image-tile .image-tile-actions .btn { width: 2rem; height: 2rem; padding: 0; display: flex; align-items: center; justify-content: center; }
.image-tile .image-tile-check {
  position: absolute;
  top: .5rem;
  left: .5rem;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .15);
}
.image-tile .image-tile-badge { position: absolute; top: .5rem; right: .5rem; }
.image-tile .image-tile-badge-start { position: absolute; top: .5rem; left: .5rem; }

.generating-tile {
  aspect-ratio: 16 / 9;
  border-radius: .75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--bs-secondary-color);
  background: linear-gradient(110deg, var(--bs-tertiary-bg) 8%, var(--bs-secondary-bg) 18%, var(--bs-tertiary-bg) 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position-x: -200%; } }

.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: .8rem;
  background: rgba(var(--bs-primary-rgb), .1);
  color: var(--bs-primary);
  text-decoration: none;
  white-space: nowrap;
}
.credit-pill.is-low { background: rgba(var(--bs-warning-rgb), .15); color: var(--bs-warning-text-emphasis); }
.credit-pill.is-empty { background: rgba(var(--bs-danger-rgb), .12); color: var(--bs-danger); }

.hero-gradient {
  background: linear-gradient(120deg, #6c5ffc 0%, #4b8cf5 55%, #0dcaf0 100%);
  color: #fff;
}
.hero-gradient .text-white-75 { color: rgba(255, 255, 255, .8); }

/* Same shape as generated images (1376×768) and as .logo-stage, so the backdrop and logo
   previews on My Account match. */
.backdrop-preview {
  width: 100%;
  aspect-ratio: 1376 / 768;
  object-fit: cover;
  border-radius: .75rem;
  background: var(--bs-tertiary-bg);
}

#lightboxModal .modal-content { background: transparent; border: 0; }
#lightboxModal img { max-height: 85vh; width: auto; max-width: 100%; border-radius: .75rem; }

/* Confirmation popup (_ConfirmDialog) */
.confirm-dialog { border-radius: 1rem; }
.confirm-dialog-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.confirm-dialog-icon .fi { line-height: 1; display: flex; }

/* Dealer logo positioning (Profile/_LogoCard) */
.logo-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1376 / 768; /* the shape the logo is actually applied to */
  overflow: hidden;
  border-radius: .75rem;
  background: var(--bs-tertiary-bg);
  user-select: none;
  touch-action: none;
}
.logo-stage-bg { display: block; width: 100%; height: 100%; object-fit: cover; }
.logo-stage-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .55);
  background: linear-gradient(180deg, #3a4150 0%, #23272f 62%, #15171c 100%);
}
.logo-stage-logo {
  position: absolute;
  cursor: grab;
  outline: 1px dashed rgba(255, 255, 255, .75);
  outline-offset: 3px;
  transition: outline-color .15s;
}
.logo-stage-logo:hover { outline-color: #fff; }
.logo-stage-logo.is-dragging { cursor: grabbing; outline-style: solid; }
.logo-stage-logo:focus-visible { outline: 2px solid var(--bs-primary); }
.logo-stage-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, .35);
  font-weight: 600;
}
.logo-glow-colour { width: 2rem; height: 1.6rem; padding: .15rem; }
.logo-position-grid {
  display: grid;
  grid-template-columns: repeat(3, 1.4rem);
  gap: .25rem;
  flex-shrink: 0;
}
.logo-position-grid button {
  width: 1.4rem;
  height: 1rem;
  padding: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: .25rem;
  background: var(--bs-tertiary-bg);
}
.logo-position-grid button:hover,
.logo-position-grid button:focus-visible { background: var(--bs-primary); border-color: var(--bs-primary); }

/* Notification bell (wwwroot/js/live-updates.js) */
.notification-count {
  position: absolute;
  top: 2px;
  right: 0;
  font-size: .6rem;
  min-width: 1.1rem;
  padding: .2em .35em;
}
.notification-menu { width: 360px; max-width: calc(100vw - 2rem); }
.notification-list { max-height: 420px; overflow-y: auto; }
.notification-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
  color: inherit;
  text-decoration: none;
}
.notification-item:last-child { border-bottom: 0; }
a.notification-item:hover { background: var(--bs-tertiary-bg); }
.notification-icon { font-size: 1.1rem; line-height: 1.3; }
.notification-message { font-size: .875rem; line-height: 1.35; }
.notification-dot {
  flex-shrink: 0;
  width: .5rem;
  height: .5rem;
  margin-top: .45rem;
  border-radius: 50%;
  background: var(--bs-primary);
}
.min-w-0 { min-width: 0; }
#liveToasts .toast { background: var(--bs-body-bg); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .2); }

/* Type-ahead suggestions (wwwroot/js/make-suggest.js) */
.suggest { position: relative; }
.suggest-menu {
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  margin-top: .25rem;
  padding: .35rem;
  border-radius: .75rem;
  box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .15);
  inset: 100% auto auto 0;
}
.suggest-menu .dropdown-item {
  border-radius: .5rem;
  padding: .45rem .75rem;
  cursor: pointer;
}
.suggest-menu .dropdown-item mark {
  padding: 0;
  background: none;
  color: inherit;
  font-weight: 700;
}
.suggest-menu .dropdown-item.active mark { color: inherit; }
