/* ============================================================
   Vehicle Selector – Frontend Styles
   ============================================================ */

/* Trigger button */
.vs-trigger-wrap {
  display: inline-block;
}

.vs-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.vs-trigger-btn:hover,
.vs-trigger-btn:focus {
  background: #333;
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

.vs-trigger-btn::before {
  content: "🚗";
  font-size: 16px;
}

/* Overlay */
.vs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

.vs-overlay.vs-visible {
  display: block;
}

/* Sidebar */
.vs-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.vs-sidebar.vs-open {
  transform: translateX(0);
}

body.vs-sidebar-open {
  overflow: hidden;
}

.vs-sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0 0 32px;
}

/* Sidebar header */
.vs-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.vs-sidebar-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

.vs-sidebar-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.vs-sidebar-close:hover {
  color: #111;
  background: #f3f4f6;
}

/* Steps */
.vs-step {
  padding: 24px;
  flex: 1;
}

/* Field groups */
.vs-field-group {
  margin-bottom: 20px;
}

.vs-field-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vs-field-group select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  color: #111;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.vs-field-group select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.vs-field-group select:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Config groups */
.vs-config-group {
  margin-bottom: 20px;
}

.vs-config-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vs-config-group select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  color: #111;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none;
  appearance: none;
}

.vs-config-group select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#vs-configs-loading {
  color: #6b7280;
  font-size: 14px;
  padding: 8px 0;
}

/* Step actions */
.vs-step-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  justify-content: flex-end;
}

/* Buttons */
.vs-btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, opacity 0.2s;
}

.vs-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.vs-btn-primary {
  background: #2563eb;
  color: #fff;
}

.vs-btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.vs-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.vs-btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

/* Responsive */
@media (max-width: 480px) {
  .vs-sidebar {
    width: 100vw;
  }
}
