/* Redline Vehicle Menu — Premium tasarım (sidebar widget, açık tema, Mobex uyumlu)
   Renk paleti: redline kırmızısı #c8102e + nötr açık zemin */

.widget_rvm,
.widget_rvm * {
  box-sizing: border-box;
}

.rvm-root {
  font-family: inherit;
  font-size: 14px;
  color: #1a1a1a;
  --rvm-red: #c8102e;
  --rvm-red-dk: #a30d25;
  --rvm-red-soft: #fef0f0;
  --rvm-border: #e5e5e5;
  --rvm-muted: #888;
  --rvm-row-h: 40px;
}

/* ───── Persistent araç pill (kalıcı seçim göstergesi) ───── */
.rvm-saved {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #f5fbf5 0%, #ecf6ec 100%);
  border: 1px solid #c8e6c9;
  border-radius: 6px;
  padding: 9px 8px 9px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.3;
}
.rvm-saved[hidden] { display: none !important; }
.rvm-saved-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.rvm-saved-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.rvm-saved-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #4a8a4a;
}
.rvm-saved-path {
  color: #1a4a1a;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rvm-saved-path .rvm-saved-sep {
  color: #88a888;
  margin: 0 3px;
  font-weight: 400;
}
.rvm-saved-edit,
.rvm-saved-clear {
  background: rgba(255,255,255,0.7);
  border: 1px solid transparent;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  color: #4a8a4a;
  flex-shrink: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.rvm-saved-clear { font-size: 16px; line-height: 1; }
.rvm-saved-edit:hover {
  background: #fff;
  border-color: #4a8a4a;
}
.rvm-saved-clear:hover {
  background: var(--rvm-red-soft);
  color: var(--rvm-red);
  border-color: var(--rvm-red);
}

/* ───── Üst başlık (kılavuz) ───── */
.rvm-prompt {
  font-size: 12px;
  color: var(--rvm-muted);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.rvm-prompt strong {
  color: var(--rvm-red);
  font-weight: 600;
}

/* ───── Breadcrumb + level pill + clear ───── */
.rvm-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  min-height: 22px;
}
.rvm-level {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--rvm-red);
  color: #fff;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.rvm-crumb {
  flex: 1;
  font-size: 12px;
  color: #666;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rvm-crumb .rvm-seg {
  cursor: pointer;
  color: var(--rvm-red);
}
.rvm-crumb .rvm-seg:hover {
  text-decoration: underline;
}
.rvm-crumb .rvm-sep {
  color: #bbb;
  margin: 0 4px;
}
.rvm-crumb .rvm-seg.rvm-last {
  color: #1a1a1a;
  font-weight: 600;
  cursor: default;
  text-decoration: none;
}
.rvm-clear {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.rvm-clear:hover {
  background: var(--rvm-red-soft);
  color: var(--rvm-red);
}
.rvm-clear[hidden] {
  display: none !important;
}
.rvm-search-btn {
  background: var(--rvm-red);
  color: #fff;
  border: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.05s;
}
.rvm-search-btn:hover {
  background: var(--rvm-red-dk);
}
.rvm-search-btn:active {
  transform: translateY(1px);
}
.rvm-search-btn[hidden] {
  display: none !important;
}

/* ───── Arama input (üstte, ikonlu) ───── */
.rvm-search {
  position: relative;
  margin-bottom: 10px;
}
.rvm-search::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat center / contain;
  pointer-events: none;
  opacity: 0.7;
}
.rvm-filter {
  width: 100%;
  padding: 11px 12px 11px 34px;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid var(--rvm-border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rvm-filter:focus {
  outline: none;
  border-color: var(--rvm-red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}
.rvm-filter::placeholder {
  color: #b5b5b5;
  font-weight: 400;
}

/* ───── Suggestion paneli (type-ahead) ───── */
.rvm-suggest {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
  border: 1px solid var(--rvm-border);
  border-radius: 6px;
  max-height: 380px;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.rvm-suggest li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #f3f3f3;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.1s;
}
.rvm-suggest li:last-child {
  border-bottom: none;
}
.rvm-suggest li:hover,
.rvm-suggest li.rvm-active {
  background: var(--rvm-red-soft);
}
.rvm-suggest .rvm-path {
  flex: 1;
  color: #1a1a1a;
  word-break: break-word;
  line-height: 1.4;
}
.rvm-suggest .rvm-path-sep {
  color: #c5c5c5;
  margin: 0 5px;
  font-size: 11px;
}
.rvm-suggest .rvm-mark {
  background: rgba(200, 16, 46, 0.18);
  color: var(--rvm-red);
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 700;
}
.rvm-suggest .rvm-suggest-level {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--rvm-muted);
  background: #f5f5f5;
  padding: 3px 7px;
  border-radius: 8px;
  flex-shrink: 0;
}
.rvm-suggest li:hover .rvm-suggest-level,
.rvm-suggest li.rvm-active .rvm-suggest-level {
  background: #fff;
  color: var(--rvm-red);
}
.rvm-suggest .rvm-suggest-leaf {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--rvm-red);
  padding: 3px 7px;
  border-radius: 8px;
  flex-shrink: 0;
}
.rvm-suggest .rvm-go-arrow {
  color: #c5c5c5;
  font-size: 14px;
  flex-shrink: 0;
  font-weight: 700;
}
.rvm-suggest li:hover .rvm-go-arrow,
.rvm-suggest li.rvm-active .rvm-go-arrow {
  color: var(--rvm-red);
}
.rvm-suggest .rvm-empty {
  color: var(--rvm-muted);
  font-style: italic;
  text-align: center;
  padding: 24px 16px;
  cursor: default;
  justify-content: center;
}
.rvm-suggest .rvm-empty:hover {
  background: #fff;
}

/* ───── Liste (varsayılan list görünümü) ───── */
.rvm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rvm-border);
  border-radius: 4px;
  max-height: 380px;
  overflow-y: auto;
  background: #fff;
}
.rvm-list li {
  position: relative;
  padding: 0 14px 0 12px;
  min-height: var(--rvm-row-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #f3f3f3;
  cursor: pointer;
  font-size: 13px;
  color: #2a2a2a;
  transition: background 0.12s, color 0.12s, padding-left 0.12s;
}
.rvm-list li:last-child {
  border-bottom: none;
}
/* Sol kırmızı şerit (hover'da görünür) */
.rvm-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--rvm-red);
  transition: width 0.12s;
}
.rvm-list li:hover {
  background: #fafafa;
  color: var(--rvm-red);
  padding-left: 16px;
}
.rvm-list li:hover::before {
  width: 3px;
}
/* Chevron — alt seviyesi olan satırlar */
.rvm-list li.rvm-has-child::after {
  content: '›';
  color: #c5c5c5;
  font-size: 18px;
  font-weight: 300;
  margin-left: auto;
  flex-shrink: 0;
  transition: color 0.12s, transform 0.12s;
}
.rvm-list li.rvm-has-child:hover::after {
  color: var(--rvm-red);
  transform: translateX(2px);
}
.rvm-list .rvm-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rvm-list .rvm-code {
  color: var(--rvm-muted);
  font-size: 11px;
  font-weight: normal;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.rvm-list li:hover .rvm-code {
  background: var(--rvm-red-soft);
  color: var(--rvm-red);
}
.rvm-list li.rvm-empty {
  color: var(--rvm-muted);
  cursor: default;
  font-style: italic;
  text-align: center;
  justify-content: center;
  padding: 16px;
}
.rvm-list li.rvm-empty:hover {
  background: #fff;
  color: var(--rvm-muted);
  padding-left: 16px;
}
.rvm-list li.rvm-empty::before {
  display: none;
}

/* ───── Marka grid (depth 0) ───── */
.rvm-list.rvm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: none;
  background: transparent;
  max-height: 420px;
  gap: 6px;
  padding: 2px;
}
.rvm-list.rvm-grid li {
  border: 1px solid var(--rvm-border);
  border-radius: 6px;
  background: #fff;
  padding: 10px 10px 10px 14px;
  min-height: 52px;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
}
.rvm-list.rvm-grid li:hover {
  border-color: var(--rvm-red);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(200, 16, 46, 0.08);
  padding-left: 14px;
  color: #1a1a1a;
}
.rvm-list.rvm-grid li::before { display: none; }
.rvm-list.rvm-grid li.rvm-has-child::after {
  font-size: 16px;
  margin-left: 4px;
}
.rvm-list.rvm-grid .rvm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rvm-red-soft);
  color: var(--rvm-red);
  font-size: 12px;
  font-weight: 700;
  margin-right: 9px;
  flex-shrink: 0;
  letter-spacing: 0;
}
.rvm-list.rvm-grid li:hover .rvm-badge {
  background: var(--rvm-red);
  color: #fff;
}
.rvm-list.rvm-grid li.rvm-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--rvm-border);
}

/* ───── Yaprak (kasa) seçildi kartı ───── */
.rvm-leaf {
  background: linear-gradient(180deg, #fef5f6 0%, #fef0f0 100%);
  border: 1px solid #f4c4c4;
  border-radius: 6px;
  padding: 14px;
  margin-top: 10px;
}
.rvm-leaf-title {
  margin: 0 0 8px 0;
  color: var(--rvm-red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rvm-leaf-path {
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  word-break: break-word;
  line-height: 1.4;
}
.rvm-leaf-cta {
  display: block;
  width: 100%;
  background: var(--rvm-red);
  color: #fff;
  border: none;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition: background 0.15s, transform 0.05s;
}
.rvm-leaf-cta:hover {
  background: var(--rvm-red-dk);
}
.rvm-leaf-cta:active {
  transform: translateY(1px);
}

/* ───── Yükleniyor ───── */
.rvm-loading {
  background: #fafafa;
  border: 1px solid var(--rvm-border);
  padding: 12px;
  border-radius: 4px;
  color: var(--rvm-muted);
  font-size: 12px;
  text-align: center;
  margin-bottom: 8px;
}
.rvm-loading::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid #ddd;
  border-top-color: var(--rvm-red);
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 8px;
  animation: rvm-spin 0.8s linear infinite;
}
@keyframes rvm-spin {
  to { transform: rotate(360deg); }
}

/* ───── Hata ───── */
.rvm-error {
  background: var(--rvm-red-soft);
  border: 1px solid #f4c4c4;
  padding: 10px;
  border-radius: 4px;
  color: var(--rvm-red);
  font-size: 12px;
  margin-bottom: 8px;
}

/* ───── Versiyon ───── */
.rvm-version {
  color: #c5c5c5;
  font-size: 10px;
  text-align: right;
  margin-top: 8px;
  letter-spacing: 0.3px;
}

/* ───── Scrollbar tweak (WebKit) ───── */
.rvm-list::-webkit-scrollbar {
  width: 8px;
}
.rvm-list::-webkit-scrollbar-track {
  background: #f7f7f7;
}
.rvm-list::-webkit-scrollbar-thumb {
  background: #d5d5d5;
  border-radius: 4px;
}
.rvm-list::-webkit-scrollbar-thumb:hover {
  background: var(--rvm-red);
}
