/* ============================================================
   dealer.css — Dealer admin: add-vehicle form (.dl-* prefix)
   Extends css/admin/dashboard.css
   ============================================================ */

/* ---- Page header ---- */
.dl-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.75rem 2rem 1.5rem;
  border-bottom: 1px solid var(--db-border, #e5e7eb);
}

.dl-breadcrumb {
  font-family: var(--gx-font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(31,31,30,0.45);
  margin: 0 0 8px;
}
.dl-breadcrumb span { color: var(--gx-dark); }

.dl-page-title {
  font-family: var(--gx-font-heading);
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gx-dark);
  margin: 0 0 6px;
}

.dl-page-sub {
  font-size: 0.875rem;
  color: rgba(31,31,30,0.55);
  margin: 0;
}

.dl-req {
  color: #ef4444;
  font-weight: 700;
}

.dl-page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.05rem;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.dl-btn:hover { transform: translateY(-1px); }
.dl-btn--ghost {
  background: var(--gx-white, #fff);
  color: var(--gx-dark);
  border-color: var(--gx-gray-light, #e5e7eb);
}
.dl-btn--ghost:hover { background: var(--gx-off-white, #f8f9fb); }
.dl-btn--primary {
  background: var(--gx-dark, #0a0a0c);
  color: var(--gx-lime, #c9ec66);
}
.dl-btn--primary:hover {
  background: var(--gx-lime, #c9ec66);
  color: var(--gx-dark);
}

/* ---- Layout grid ---- */
.dl-form { padding: 1.5rem 2rem 4rem; }

.dl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.5rem;
  align-items: start;
}

.dl-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

/* ---- Card ---- */
.dl-card {
  background: var(--gx-white, #fff);
  border: 1px solid var(--gx-gray-light, #e5e7eb);
  border-radius: 16px;
  padding: 1.75rem;
}

.dl-card__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dl-step {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--gx-dark, #0a0a0c);
  color: var(--gx-lime, #c9ec66);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--gx-font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.dl-card__title {
  font-family: var(--gx-font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--gx-dark);
}

.dl-card__sub {
  font-size: 0.8125rem;
  color: rgba(31,31,30,0.55);
  margin: 0;
}

/* ---- Form atoms ---- */
.dl-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.dl-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.dl-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dl-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(31,31,30,0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dl-unit {
  font-family: var(--gx-font-mono, monospace);
  font-size: 11px;
  color: rgba(31,31,30,0.4);
  font-weight: 400;
}

.dl-input {
  height: 2.75rem;
  padding: 0 0.9rem;
  background: var(--gx-white, #fff);
  border: 1.5px solid var(--gx-gray-light, #e5e7eb);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--gx-dark);
  outline: none;
  transition: border-color 0.18s, background 0.18s;
  width: 100%;
}
.dl-input::placeholder { color: rgba(31,31,30,0.32); }
.dl-input:focus {
  border-color: var(--gx-dark, #0a0a0c);
  background: #fff;
}

select.dl-input {
  appearance: none;
  -webkit-appearance: none;
  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='%231f1f1e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

/* Input with prefix/suffix */
.dl-input-prefix,
.dl-input-suffix {
  position: relative;
}
.dl-input-prefix > span,
.dl-input-suffix > span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: rgba(31,31,30,0.5);
  font-weight: 500;
  pointer-events: none;
}
.dl-input-prefix > span { left: 0.9rem; }
.dl-input-prefix > .dl-input { padding-left: 1.85rem; }
.dl-input-suffix > span { right: 0.9rem; }
.dl-input-suffix > .dl-input { padding-right: 2.5rem; }

/* Color picker row */
.dl-color-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
.dl-color-row .dl-input { flex: 1; }
.dl-color {
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--gx-gray-light, #e5e7eb);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.dl-color::-webkit-color-swatch-wrapper { padding: 4px; }
.dl-color::-webkit-color-swatch { border: 0; border-radius: 6px; }

/* ---- Photo uploader ---- */
.dl-uploader {
  border: 2px dashed var(--gx-gray-light, #e5e7eb);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: var(--gx-off-white, #f8f9fb);
  transition: border-color 0.18s, background 0.18s;
}
.dl-uploader:hover {
  border-color: var(--gx-dark);
  background: #fff;
}
.dl-uploader__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: var(--gx-white, #fff);
  color: var(--gx-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}
.dl-uploader__title {
  font-family: var(--gx-font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gx-dark);
}
.dl-uploader__hint {
  font-size: 0.8125rem;
  color: rgba(31,31,30,0.5);
}

.dl-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}
.dl-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--gx-off-white, #f8f9fb);
}
.dl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dl-thumb__tag {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 8px;
  background: var(--gx-lime, #c9ec66);
  color: var(--gx-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 100px;
}
.dl-thumb__rm {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(10,10,12,0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s, background 0.18s;
}
.dl-thumb:hover .dl-thumb__rm { opacity: 1; }
.dl-thumb__rm:hover { background: #ef4444; }

/* ---- Tag chips ---- */
.dl-tags {
  border: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.dl-tags > .dl-label { margin-bottom: 0.25rem; }

.dl-tags > .dl-chip,
.dl-tags label.dl-chip {
  display: inline-flex;
}
.dl-tags {
  flex-direction: row;
  flex-wrap: wrap;
}
.dl-tags > .dl-label {
  flex: 1 1 100%;
}

.dl-chip {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.dl-chip input { position: absolute; opacity: 0; }
.dl-chip span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  background: var(--gx-white, #fff);
  border: 1.5px solid var(--gx-gray-light, #e5e7eb);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(31,31,30,0.7);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.dl-chip span::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--gx-gray-light, #e5e7eb);
  display: inline-block;
  transition: background 0.18s, border-color 0.18s;
}
.dl-chip input:checked + span {
  background: var(--gx-dark);
  border-color: var(--gx-dark);
  color: var(--gx-lime);
}
.dl-chip input:checked + span::before {
  background: var(--gx-lime);
  border-color: var(--gx-lime);
}

/* ---- Sticky preview rail ---- */
.dl-rail {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dl-preview {
  background: var(--gx-white, #fff);
  border: 1px solid var(--gx-gray-light, #e5e7eb);
  border-radius: 16px;
  padding: 1.25rem;
}

.dl-preview__label {
  font-family: var(--gx-font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(31,31,30,0.4);
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.dl-preview__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.dl-preview__title {
  font-family: var(--gx-font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 0.2rem;
  color: var(--gx-dark);
}

.dl-preview__sub {
  font-size: 0.8125rem;
  color: rgba(31,31,30,0.55);
  margin: 0 0 1rem;
}

.dl-preview__specs {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(31,31,30,0.6);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gx-gray-light);
}
.dl-preview__specs strong {
  display: block;
  font-family: var(--gx-font-heading);
  color: var(--gx-dark);
  font-size: 0.95rem;
  font-weight: 600;
}

.dl-preview__price {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}
.dl-preview__price-num {
  font-family: var(--gx-font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--gx-dark);
  letter-spacing: -0.02em;
}
.dl-preview__price-unit {
  font-size: 0.8125rem;
  color: rgba(31,31,30,0.5);
}

/* Dealer help block */
.dl-help {
  background: var(--gx-dark);
  color: var(--gx-white);
  border-radius: 16px;
  padding: 1.25rem;
}
.dl-help__title {
  font-family: var(--gx-font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0 0 0.4rem;
}
.dl-help__text {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
  margin: 0;
}
.dl-help__link {
  color: var(--gx-lime, #c9ec66);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-rail { position: static; }
}

@media (max-width: 768px) {
  .dl-page-head { padding: 1.25rem; }
  .dl-form { padding: 1rem; }
  .dl-card { padding: 1.25rem; }
  .dl-grid-2,
  .dl-grid-3 { grid-template-columns: 1fr; }
}
