/**
 * Tornado Validus - Front-end Vehicle Selector & Fitment Styles
 */

.tornado-vehicle-selector-wrapper {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  font-family: inherit;
  color: #1e293b;
  box-sizing: border-box;
}

.tornado-vehicle-selector-wrapper *,
.tornado-vehicle-selector-wrapper *::before,
.tornado-vehicle-selector-wrapper *::after {
  box-sizing: border-box;
}

.tornado-vehicle-selector-title {
  margin: 0 0 1.25rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
}

.tornado-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: end;
}

@media (min-width: 640px) {
  .tornado-vehicle-selector-wrapper.layout-grid .tornado-form-grid,
  .tornado-vehicle-selector-wrapper.layout-horizontal .tornado-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tornado-vehicle-selector-wrapper.layout-grid .tornado-form-grid,
  .tornado-vehicle-selector-wrapper.layout-horizontal .tornado-form-grid {
    grid-template-columns: 1.2fr 1.2fr 1fr auto;
  }
}

.tornado-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  width: 100%;
}

.tornado-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  display: block;
}

.tornado-label-spacer {
  visibility: hidden;
  height: 1.25rem;
}

@media (max-width: 1023px) {
  .tornado-label-spacer {
    display: none;
  }
}

.tornado-select-wrap {
  position: relative;
  width: 100%;
}

.tornado-select {
  width: 100%;
  height: 2.75rem;
  padding: 0.5rem 2.25rem 0.5rem 0.875rem;
  font-size: 0.95rem;
  color: #0f172a;
  background-color: #f8fafc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.65rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.tornado-select:hover:not(:disabled) {
  border-color: #94a3b8;
  background-color: #ffffff;
}

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

.tornado-select:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
  opacity: 0.8;
}

.tornado-actions-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tornado-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  text-decoration: none;
}

.tornado-submit-btn:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.tornado-submit-btn:active {
  transform: translateY(1px);
}

.tornado-btn-icon {
  flex-shrink: 0;
}

.tornado-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background-color: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

.tornado-reset-btn:hover {
  color: #0f172a;
  background-color: #f1f5f9;
  border-color: #94a3b8;
  text-decoration: none;
}

/* Active vehicle filter notice */
.tornado-active-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem 0;
  padding: 0.875rem 1.25rem;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  color: #1e40af;
  font-size: 0.95rem;
}

.tornado-active-filter-content {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.tornado-active-filter-icon {
  display: inline-flex;
  align-items: center;
  color: #2563eb;
}

.tornado-active-filter-text strong {
  color: #1e3a8a;
  font-weight: 600;
}

.tornado-active-filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ef4444;
  padding: 0.25rem 0.625rem;
  background-color: #ffffff;
  border: 1px solid #fca5a5;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.tornado-active-filter-clear:hover {
  background-color: #fee2e2;
  color: #b91c1c;
  border-color: #f87171;
  text-decoration: none;
}
