/* TR Araç Filtresi — Frontend CSS | Tech Review */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --vf-red:        #D51212;
  --vf-red-hover:  #b50f0f;
  --vf-dark:       #1a1a2e;
  --vf-text:       #1f2937;
  --vf-muted:      #6b7280;
  --vf-border:     #e5e7eb;
  --vf-bg:         #ffffff;
  --vf-bg2:        #f9fafb;
  --vf-shadow:     0 4px 24px rgba(0,0,0,0.09);
  --vf-radius:     12px;
  --vf-radius-sm:  8px;
}

.tr-vf-widget *,
.tr-vf-widget *::before,
.tr-vf-widget *::after { box-sizing: border-box; }

.tr-vf-widget {
  font-family: 'Inter', system-ui, sans-serif;
  width: 100%;
  margin: 0 0 32px;
}

/* ── Inner container ── */
.tr-vf-inner {
  background: var(--vf-bg);
  border: 1px solid var(--vf-border);
  border-radius: var(--vf-radius);
  box-shadow: var(--vf-shadow);
  padding: 20px 24px 22px;
}

/* ── Field row ── */
.tr-vf-field-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.tr-vf-field {
  flex: 1 1 170px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tr-vf-btn-field {
  flex: 0 0 auto;
}

/* ── Label ── */
.tr-vf-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vf-muted);
}
.tr-vf-label-hidden { visibility: hidden; }

/* ── MARKA DROPDOWN ── */
.tr-vf-brand-dd {
  position: relative;
}

.tr-vf-brand-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 40px 8px 12px;
  background: var(--vf-bg);
  border: 1.5px solid var(--vf-border);
  border-radius: var(--vf-radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  color: var(--vf-text);
  transition: border-color .15s, box-shadow .15s;
  position: relative;
}

.tr-vf-brand-trigger:hover,
.tr-vf-brand-dd.is-open .tr-vf-brand-trigger {
  border-color: var(--vf-red);
  box-shadow: 0 0 0 3px rgba(213,18,18,.1);
	background-color: #fff;
	 
}

.tr-vf-brand-logo-wrap {
  flex-shrink: 0;
 
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  background: var(--vf-bg2);
}

.tr-vf-brand-logo-wrap img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.tr-vf-brand-logo-ph {

  border-radius: 6px;
}

.tr-vf-brand-txt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}
.tr-vf-brand-txt.is-ph { color: var(--vf-muted); font-weight: 400; }

.tr-vf-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  color: var(--vf-muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.tr-vf-brand-dd.is-open .tr-vf-chevron {
  transform: translateY(-50%) rotate(-180deg);
}

/* Brand Panel */
.tr-vf-brand-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 260px;
  z-index: 9999;
  background: var(--vf-bg);
  border: 1.5px solid var(--vf-border);
  border-radius: var(--vf-radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  overflow: hidden;
}
.tr-vf-brand-dd.is-open .tr-vf-brand-panel {
  display: block;
  animation: vfSlideIn .15s ease;
}

@keyframes vfSlideIn {
  from { opacity:0; transform: translateY(-6px); }
  to   { opacity:1; transform: translateY(0); }
}

/* Search inside panel */
.tr-vf-brand-search-wrap {
  padding: 10px 10px 6px;
  border-bottom: 1px solid var(--vf-border);
  position: sticky;
  top: 0;
  background: var(--vf-bg);
  z-index: 1;
}

.tr-vf-brand-search {
  width: 100%;
  padding: 7px 12px;
  font-size: 13px;
  font-family: inherit;
  border: 1.5px solid var(--vf-border);
  border-radius: 6px;
  outline: none;
  color: var(--vf-text);
  background: var(--vf-bg2);
  transition: border-color .15s;
}
.tr-vf-brand-search:focus {
  border-color: var(--vf-red);
  background: #fff;
}

/* Options list */
.tr-vf-brand-options {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 300px;
  overflow-y: auto;
}

.tr-vf-brand-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background .1s;
  font-size: 14px;
  color: var(--vf-text);
}

.tr-vf-brand-opt:hover,
.tr-vf-brand-opt.is-focused {
  background: var(--vf-bg2);
}

.tr-vf-brand-opt.is-selected {
  background: rgba(213,18,18,.07);
  font-weight: 600;
  color: var(--vf-red);
}

.tr-vf-opt-logo-wrap {
  flex-shrink: 0;
 
  border-radius: 6px;
  background: var(--vf-bg2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tr-vf-opt-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.tr-vf-opt-logo-ph {
  display: block;

  background: #d1d5db;
  border-radius: 3px;
}

.tr-vf-opt-name { flex: 1; min-width: 0; font-weight: 500; }

.tr-vf-opt-models {
  font-size: 11px;
  color: var(--vf-muted);
  flex-shrink: 0;
}

/* ── SELECT elements ── */
.tr-vf-select-wrap {
  position: relative;
}

.tr-vf-select {
  width: 100%;
  min-height: 48px;
  padding: 0 40px 0 14px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--vf-text);
  background: var(--vf-bg);
  border: 1.5px solid var(--vf-border);
  border-radius: var(--vf-radius-sm);
  appearance: none;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.tr-vf-select:focus,
.tr-vf-select:hover:not(:disabled) {
  border-color: var(--vf-red);
  box-shadow: 0 0 0 3px rgba(213,18,18,.1);
}
.tr-vf-select:disabled {
  opacity: .5;
  cursor: not-allowed;
  background: var(--vf-bg2) !important;
}

.tr-vf-sel-arrow {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  color: var(--vf-muted);
  pointer-events: none;
}

/* ── Submit button ── */
.tr-vf-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px;
  background: var(--vf-red);
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--vf-radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .1s, box-shadow .15s;
  letter-spacing: 0.02em;
}
.tr-vf-submit:hover {
  background: var(--vf-red-hover);
  box-shadow: 0 4px 14px rgba(213,18,18,.35);
}
.tr-vf-submit:active {
  transform: scale(.97);
}
.tr-vf-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.tr-vf-submit.is-loading {
  pointer-events: none;
  opacity: .75;
}
.tr-vf-submit svg { flex-shrink: 0; }

/* ── Result / Loading ── */
.tr-vf-result {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--vf-radius-sm);
  font-size: 13px;
  font-weight: 500;
}
.tr-vf-result.is-loading {
  background: var(--vf-bg2);
  color: var(--vf-muted);
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.tr-vf-result.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Spinner */
.tr-vf-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--vf-red);
  border-radius: 50%;
  animation: vfSpin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes vfSpin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .tr-vf-field { flex: 1 1 140px; }
}
@media (max-width: 640px) {
  .tr-vf-inner { padding: 16px; }
  .tr-vf-field { flex: 1 1 100%; }
  .tr-vf-btn-field { flex: 1 1 100%; }
  .tr-vf-submit { width: 100%; justify-content: center; }
  .tr-vf-brand-panel { position: fixed; left: 10px; right: 10px; top: auto; }
  .tr-vf-label-hidden { display: none; }
}
