:root {
  --at-bg: #07101f;
  --at-panel: #0d192c;
  --at-panel-soft: #111f35;
  --at-border: #263956;
  --at-text: #f3f6fc;
  --at-muted: #9bacbf;
  --at-orange: #f5a623;
  --at-orange-soft: rgba(245, 166, 35, 0.14);
  --at-danger: #ff6b6b;
  --at-radius: 14px;
}

.at-component,
.at-component * {
  box-sizing: border-box;
}

.at-component {
  width: 100%;
  min-width: 0;
  color: var(--at-text);
  background: linear-gradient(145deg, rgba(17, 31, 53, 0.96), rgba(7, 16, 31, 0.98));
  border: 1px solid var(--at-border);
  border-radius: var(--at-radius);
  padding: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.at-heading {
  margin-bottom: 20px;
}

.at-title {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.2;
}

.at-subtitle,
.at-status,
.at-hint {
  color: var(--at-muted);
}

.at-subtitle {
  margin: 0;
  line-height: 1.55;
}

.at-status {
  margin: 0 0 18px;
  min-height: 20px;
  font-size: 0.875rem;
}

.at-status.is-ready {
  color: #65d6b3;
}

.at-status.is-error {
  color: var(--at-danger);
}

.at-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.at-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.at-steps .at-field {
  position: relative;
  border: 1px solid rgba(38, 57, 86, 0.78);
  border-radius: 12px;
  padding: 14px;
  background: rgba(5, 13, 26, 0.38);
}

.at-steps .at-field:last-child {
  grid-column: 1 / -1;
}

.at-step-number {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  margin: 0 7px 8px 0;
  border-radius: 999px;
  color: #07101f;
  background: var(--at-orange);
  font-size: 0.75rem;
  font-weight: 800;
}

.at-steps .at-label {
  display: inline-block;
}

.at-field {
  min-width: 0;
}

.at-field-full {
  margin-top: 20px;
}

.at-field[hidden],
.at-check-item[hidden],
.at-equipment-category[hidden] {
  display: none;
}

.at-label {
  display: block;
  margin-bottom: 7px;
  color: #dfe7f2;
  font-size: 0.875rem;
  font-weight: 650;
}

.at-control {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  border: 1px solid var(--at-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--at-text);
  background: rgba(5, 13, 26, 0.86);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.at-control:focus {
  border-color: var(--at-orange);
  box-shadow: 0 0 0 3px var(--at-orange-soft);
}

.at-control:disabled {
  color: #72839a;
  cursor: not-allowed;
  opacity: 0.72;
}

.at-control:read-only {
  color: #c6d1df;
  background: rgba(18, 31, 50, 0.8);
}

.at-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.45;
}

.at-search {
  max-width: 520px;
  margin-bottom: 18px;
}

.at-textarea {
  resize: vertical;
  min-height: 100px;
}

.at-section-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.at-section-heading {
  margin: 24px 0 14px;
}

.at-section-heading .at-hint {
  margin-top: 0;
}

.at-auto-specs,
.at-manual-panel,
.at-basic-equipment,
.at-selection-summary {
  margin-top: 18px;
  border: 1px solid var(--at-border);
  border-radius: 12px;
  padding: 17px;
  background: rgba(5, 13, 26, 0.55);
}

.at-auto-specs {
  border-color: rgba(101, 214, 179, 0.42);
}

.at-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.at-spec-item {
  display: grid;
  gap: 4px;
  border-radius: 9px;
  padding: 12px;
  background: rgba(17, 31, 53, 0.86);
}

.at-spec-label {
  color: var(--at-muted);
  font-size: 0.75rem;
}

.at-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  border: 0;
  padding: 8px 0;
  color: var(--at-orange);
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.at-inline-manual {
  margin-top: 14px;
}

.at-warning-copy {
  margin: 0 0 12px;
  border-left: 3px solid var(--at-orange);
  padding: 10px 12px;
  color: #f4dfb8;
  background: var(--at-orange-soft);
  font-weight: 700;
}

.at-basic-list {
  display: grid;
  gap: 7px;
  margin: 0 0 10px;
  padding-left: 20px;
  color: #d5dfeb;
  line-height: 1.45;
}

.at-selection-summary {
  margin: 0 0 18px;
}

.at-summary-items {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.at-summary-chip {
  border: 1px solid rgba(245, 166, 35, 0.34);
  border-radius: 999px;
  padding: 5px 9px;
  color: #f8d79c;
  background: var(--at-orange-soft);
  font-size: 0.75rem;
}

.at-summary-chip.more,
.at-empty-summary {
  color: var(--at-muted);
}

.at-equipment-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.at-equipment-category {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--at-border);
  border-radius: 11px;
  background: rgba(7, 16, 31, 0.55);
}

.at-category-summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--at-text);
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
}

.at-category-summary:hover {
  background: rgba(245, 166, 35, 0.06);
}

.at-count {
  min-width: 92px;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--at-orange);
  background: var(--at-orange-soft);
  font-size: 0.75rem;
  text-align: center;
  white-space: nowrap;
}

.at-count.has-selected {
  color: #07101f;
  background: var(--at-orange);
}

.at-category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 14px 8px;
}

.at-small-button {
  min-height: 44px;
  border: 1px solid rgba(245, 166, 35, 0.45);
  border-radius: 8px;
  padding: 9px 12px;
  color: #f5bf64;
  background: rgba(245, 166, 35, 0.08);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.at-small-button.secondary {
  border-color: var(--at-border);
  color: var(--at-muted);
  background: transparent;
}

.at-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 14px 15px;
}

.at-check-item {
  display: flex;
  align-items: flex-start;
  min-height: 44px;
  gap: 9px;
  min-width: 0;
  border-radius: 8px;
  padding: 10px 8px;
  color: #d8e1ed;
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1.35;
}

.at-check-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.at-check-item input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--at-orange);
}

/* Prikaz podatkov na strani oglasa */
.at-listing-specs,
.at-listing-equipment,
.at-listing-specs *,
.at-listing-equipment * {
  box-sizing: border-box;
}

.at-listing-specs,
.at-listing-equipment {
  width: 100%;
  min-width: 0;
  color: var(--at-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.at-display-title {
  margin: 0 0 16px;
  color: var(--at-text);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.25;
}

.at-listing-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.at-listing-spec {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  border: 1px solid rgba(38, 57, 86, 0.82);
  border-radius: 11px;
  padding: 12px;
  background: #0a0f1c;
}

.at-listing-spec-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(155, 172, 191, 0.28);
  border-radius: 9px;
  color: var(--at-muted);
  background: rgba(155, 172, 191, 0.08);
}

.at-listing-spec-icon svg {
  width: 20px;
  height: 20px;
}

.at-listing-spec--engine {
  border-color: rgba(255, 167, 38, 0.5);
  box-shadow: inset 3px 0 0 #ffa726;
}

.at-listing-spec--engine .at-listing-spec-icon {
  border-color: rgba(255, 167, 38, 0.38);
  color: #ffa726;
  background: rgba(255, 167, 38, 0.12);
}

.at-listing-spec-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.at-listing-spec-label {
  color: var(--at-muted);
  font-size: 0.73rem;
  line-height: 1.25;
}

.at-listing-spec-value {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--at-text);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.35;
}

.at-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.at-listing-specs-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.at-listing-spec-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(38, 57, 86, 0.8);
  border-radius: 8px;
  padding: 6px 7px;
  color: #dce5f0;
  background: #0a0f1c;
}

.at-listing-spec-chip-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  color: var(--at-muted);
}

.at-listing-spec-chip-icon svg {
  width: 18px;
  height: 18px;
}

.at-listing-spec-chip-copy {
  display: block;
  min-width: 0;
}

.at-listing-spec-chip-value {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #dce5f0;
  font-size: 0.75rem;
  font-weight: 720;
  line-height: 1.25;
}

.at-listing-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.at-listing-equipment-category,
.at-listing-equipment-legacy,
.at-listing-additional-equipment {
  min-width: 0;
  border: 1px solid rgba(38, 57, 86, 0.82);
  border-radius: 11px;
  padding: 15px;
  background: rgba(7, 16, 31, 0.54);
}

.at-listing-equipment-category-title {
  margin: 0 0 10px;
  color: #dfe7f2;
  font-size: 0.9rem;
  line-height: 1.35;
}

.at-listing-equipment-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.at-listing-equipment-legacy-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.at-listing-equipment-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  color: #d8e1ed;
  font-size: 0.86rem;
  line-height: 1.45;
}

.at-listing-equipment-item > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.at-listing-check {
  flex: 0 0 auto;
  color: #65d6b3;
  font-weight: 850;
}

.at-listing-additional-equipment {
  margin-top: 12px;
  border-color: rgba(245, 166, 35, 0.28);
  background: rgba(245, 166, 35, 0.06);
}

.at-listing-additional-text {
  margin: 0;
  color: #d8e1ed;
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 767px) {
  .at-component {
    padding: 18px;
    border-radius: 12px;
  }

  .at-equipment-categories {
    grid-template-columns: 1fr;
  }

  .at-check-grid {
    grid-template-columns: 1fr;
  }

  .at-spec-grid {
    grid-template-columns: 1fr;
  }

  .at-listing-specs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .at-listing-specs-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .at-listing-equipment-grid,
  .at-listing-equipment-legacy-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .at-grid {
    grid-template-columns: 1fr;
  }

  .at-steps {
    grid-template-columns: 1fr;
  }

  .at-steps .at-field:last-child {
    grid-column: auto;
  }

  .at-component {
    padding: 15px;
  }

  .at-category-summary {
    padding: 13px;
  }

  .at-listing-specs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .at-control {
    transition: none;
  }
}

/* Logotip znamke: izvirne barve so prikazane na enotni svetli ploščici. */
.at-brand-logo {
  --at-brand-logo-width: 72px;
  --at-brand-logo-height: 44px;
  --at-brand-image-width: 64px;
  --at-brand-image-height: 32px;
  width: var(--at-brand-logo-width);
  height: var(--at-brand-logo-height);
  min-width: var(--at-brand-logo-width);
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(34, 51, 76, 0.16);
  border-radius: 10px;
  color: #17243a;
  background: #f7f8fb;
  box-shadow: 0 2px 8px rgba(1, 8, 20, 0.16);
  vertical-align: middle;
}

.at-brand-logo--small {
  --at-brand-logo-width: 52px;
  --at-brand-logo-height: 36px;
  --at-brand-image-width: 44px;
  --at-brand-image-height: 24px;
}

.at-brand-logo--large {
  --at-brand-logo-width: 88px;
  --at-brand-logo-height: 58px;
  --at-brand-image-width: 72px;
  --at-brand-image-height: 38px;
}

/* Simboli dobijo bolj kvadratno polje, dolgi besedni znaki pa dovolj širine za čitljivost. */
.at-brand-logo--fit-symbol {
  --at-brand-image-width: 32px;
  --at-brand-image-height: 32px;
}

.at-brand-logo--small.at-brand-logo--fit-symbol {
  --at-brand-image-width: 25px;
  --at-brand-image-height: 25px;
}

.at-brand-logo--large.at-brand-logo--fit-symbol {
  --at-brand-image-width: 40px;
  --at-brand-image-height: 40px;
}

.at-brand-logo--fit-wide {
  --at-brand-logo-width: 92px;
  --at-brand-image-width: 80px;
}

.at-brand-logo--small.at-brand-logo--fit-wide {
  --at-brand-logo-width: 74px;
  --at-brand-image-width: 66px;
}

.at-brand-logo--large.at-brand-logo--fit-wide {
  --at-brand-logo-width: 112px;
  --at-brand-image-width: 98px;
}

.at-brand-logo--fit-wordmark {
  --at-brand-logo-width: 120px;
  --at-brand-image-width: 112px;
}

.at-brand-logo--small.at-brand-logo--fit-wordmark {
  --at-brand-logo-width: 104px;
  --at-brand-image-width: 96px;
}

.at-brand-logo--large.at-brand-logo--fit-wordmark {
  --at-brand-logo-width: 136px;
  --at-brand-image-width: 124px;
}

.at-brand-logo-image {
  display: block;
  width: auto;
  height: auto;
  max-width: var(--at-brand-image-width);
  max-height: var(--at-brand-image-height);
  object-fit: contain;
  opacity: 1;
  transform: scale(var(--at-brand-image-scale, 1));
  transform-origin: center;
}

.at-brand-logo--scale-110 { --at-brand-image-scale: 1.1; }
.at-brand-logo--scale-120 { --at-brand-image-scale: 1.2; }
.at-brand-logo--scale-130 { --at-brand-image-scale: 1.3; }
.at-brand-logo--scale-140 { --at-brand-image-scale: 1.4; }

.at-brand-logo-image.is-loading {
  opacity: 0;
}

.at-brand-logo-initial {
  font-size: calc(var(--at-brand-logo-height) * 0.42);
  font-weight: 800;
  line-height: 1;
}

.at-brand-select-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.at-brand-select-row > .at-control {
  min-width: 0;
  flex: 1 1 auto;
}

.at-selected-brand-logo {
  flex: 0 0 auto;
}

.at-brand-picker-demo {
  min-width: 0;
  border: 1px solid var(--at-border);
  border-radius: 14px;
  background: rgba(13, 25, 44, 0.92);
}

.at-brand-picker-summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  color: var(--at-text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 750;
  list-style: none;
}

.at-brand-picker-summary::-webkit-details-marker {
  display: none;
}

.at-brand-picker-summary::after {
  content: '⌄';
  color: var(--at-orange);
  font-size: 1.2rem;
}

.at-brand-picker-demo[open] .at-brand-picker-summary::after {
  transform: rotate(180deg);
}

.at-brand-picker-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 390px;
  margin: 0;
  padding: 12px;
  overflow-y: auto;
  border-top: 1px solid var(--at-border);
  list-style: none;
}

.at-brand-picker-option {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(38, 57, 86, 0.82);
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--at-text);
  background: rgba(7, 16, 31, 0.72);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.at-brand-picker-option:hover,
.at-brand-picker-option:focus-visible {
  border-color: var(--at-orange);
  outline: none;
  box-shadow: 0 0 0 3px var(--at-orange-soft);
}

.at-brand-picker-option-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.at-brand-picker-status {
  margin: 0;
  padding: 14px 16px;
  color: var(--at-muted);
}

@media (max-width: 767px) {
  .at-brand-picker-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .at-brand-picker-list {
    grid-template-columns: 1fr;
  }
}
