
/* ========================================
   Vehicle Trim Checker Widget
   Styled based on Jouver design system
   ======================================== */

.vtc-widget * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.vtc-widget {
  --vtc-orange: #f59e0b;
  --vtc-orange-dark: #d97706;
  --vtc-blue: #f59e0b;
  --vtc-blue-dark: #d97706;
  --vtc-gray-50: #f3f3f2;
  --vtc-gray-100: #f9f8f6;
  --vtc-gray-200: #d4d3d1;
  --vtc-gray-300: #d4d3d1;
  --vtc-gray-400: #a8a29e;
  --vtc-gray-500: #78716c;
  --vtc-gray-600: #57534e;
  --vtc-gray-700: #44403c;
  --vtc-gray-800: #1c1917;
  --vtc-gray-900: #1c1917;
  --vtc-success: #10b981;
  --vtc-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --vtc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --vtc-radius: 8px;
  --vtc-radius-lg: 12px;
  --vtc-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  color: var(--vtc-gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.vtc-container {
  background: white !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  overflow: hidden !important;
  max-width: 100% !important;
  margin: 20px 0 !important;
}

/* Header */
.vtc-header {
  background: linear-gradient(135deg, #fef3c7 0%, #f9f8f6 50%, #fef3c7 100%);
  padding: 24px;
  border-bottom: 1px solid var(--vtc-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.vtc-title {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #111827 !important;
}
.vtc-title svg {
  width: 10px;
  height: 10px;
   color: #FF6B35 !important;
}

/* Language Selector */
.vtc-lang-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vtc-lang-select {
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--vtc-gray-700);
  background: white;
  border: 1px solid var(--vtc-gray-300);
  border-radius: var(--vtc-radius);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all var(--vtc-transition);
}

.vtc-lang-select:hover {
  border-color: var(--vtc-blue);
}

.vtc-lang-select:focus {
  outline: none;
  border-color: var(--vtc-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.vtc-lang-icon {
  width: 16px;
  height: 16px;
  color: var(--vtc-gray-500);
}

/* Selectors Grid */
.vtc-selectors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px;
  background: var(--vtc-gray-50);
}

@media (max-width: 640px) {
  .vtc-selectors {
    grid-template-columns: 1fr;
  }
}

.vtc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vtc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--vtc-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vtc-select {
  width: 100%;
  padding: 12px 36px 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--vtc-gray-800);
  background: white;
  border: 1px solid var(--vtc-gray-300);
  border-radius: var(--vtc-radius);
  cursor: pointer;
  transition: all var(--vtc-transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.vtc-select:hover {
  border-color: var(--vtc-blue);
}

.vtc-select:focus {
  outline: none;
  border-color: var(--vtc-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.vtc-select:disabled {
  background: var(--vtc-gray-100);
  color: var(--vtc-gray-400);
  cursor: not-allowed;
}

/* Results Area */
.vtc-results {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .vtc-results {
    grid-template-columns: 1fr;
  }
}

/* Trim List */
.vtc-trim-list {
  background: #f9fafb !important;
  border-radius: 8px !important;
  padding: 20px !important;
}

.vtc-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--vtc-gray-900);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vtc-trim-item {
  width: 100%;
  padding: 14px;
  margin-bottom: 8px;
  background: white;
  border: 1px solid var(--vtc-gray-200);
  border-radius: var(--vtc-radius);
  cursor: pointer;
  text-align: left;
  transition: all var(--vtc-transition);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.vtc-trim-item:hover {
  border-color: var(--vtc-blue);
  box-shadow: var(--vtc-shadow);
}

.vtc-trim-item.active {
  border-color: var(--vtc-orange);
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.vtc-trim-info {
  flex: 1;
  min-width: 0;
}

.vtc-trim-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--vtc-gray-900);
  margin-bottom: 2px;
}

.vtc-trim-desc {
  font-size: 13px;
  color: var(--vtc-gray-500);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vtc-trim-price-box {
  text-align: right;
  flex-shrink: 0;
}

.vtc-trim-price {
  font-size: 16px;
  color: var(--vtc-orange);
  font-weight: 700;
}

.vtc-trim-price-label {
  font-size: 11px;
  color: var(--vtc-gray-500);
  margin-top: 2px;
}

.vtc-trim-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.vtc-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 9999px;
  background: var(--vtc-gray-100);
  color: var(--vtc-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Details Panel */
.vtc-details {
  background: white;
  border: 1px solid var(--vtc-gray-200);
  border-radius: var(--vtc-radius);
  overflow: hidden;
}

.vtc-details-header {
  padding: 20px;
  background: linear-gradient(135deg, #fffaf5 0%, #fff8f0 50%, #fff4e8 100%);
  border-bottom: 1px solid var(--vtc-gray-200);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.vtc-details-header-left {
  flex: 1;
  min-width: 200px;
}

.vtc-details-header-right {
  text-align: right;
}

.vtc-details-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--vtc-gray-900);
  margin-bottom: 4px;
}

.vtc-details-subtitle {
  font-size: 14px;
  color: var(--vtc-gray-600);
  margin-bottom: 4px;
}

.vtc-details-desc {
  font-size: 12px;
  color: var(--vtc-gray-500);
  margin-bottom: 12px;
}

.vtc-details-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vtc-badge-primary {
  background: var(--vtc-orange) !important;
  color: white !important;
}

.vtc-details-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--vtc-orange);
  line-height: 1.2;
}

.vtc-details-price-label {
  font-size: 12px;
  color: var(--vtc-gray-500);
}

.vtc-details-invoice {
  font-size: 12px;
  color: var(--vtc-gray-500);
  margin-top: 4px;
}

.vtc-details-body {
  padding: 20px;
}

.vtc-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 640px) {
  .vtc-specs-grid {
    grid-template-columns: 1fr;
  }
}

.vtc-spec-section {
  /* No margin needed with grid */
}

.vtc-spec-section-full {
  grid-column: 1 / -1;
}

.vtc-spec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--vtc-orange);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--vtc-gray-100);
}

.vtc-spec-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.vtc-spec-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--vtc-gray-100);
}

.vtc-spec-row:last-child {
  border-bottom: none;
}

.vtc-spec-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.vtc-spec-row-inline .vtc-spec-row {
  border-bottom: none;
}

.vtc-spec-label {
  font-size: 13px;
  color: var(--vtc-gray-500);
}

.vtc-spec-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--vtc-gray-800);
  text-align: right;
}

.vtc-details-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--vtc-gray-50);
  border-top: 1px solid var(--vtc-gray-100);
  font-size: 11px;
  color: var(--vtc-gray-500);
  flex-wrap: wrap;
  gap: 8px;
}

.vtc-details-meta {
  display: flex;
  gap: 16px;
}

.vtc-details-updated {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vtc-updated-icon {
  width: 12px;
  height: 12px;
}

/* Empty States */
.vtc-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--vtc-gray-500);
}

.vtc-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  opacity: 0.5;
}

.vtc-empty-text {
  font-size: 14px;
}

/* Loading */
.vtc-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--vtc-gray-500);
}

.vtc-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--vtc-gray-200);
  border-top-color: var(--vtc-orange);
  border-radius: 50%;
  animation: vtc-spin 0.8s linear infinite;
  margin-right: 10px;
}

@keyframes vtc-spin {
  to { transform: rotate(360deg); }
}

/* Powered By Footer */
.vtc-footer {
  text-align: center;
  padding: 12px;
  background: var(--vtc-gray-50);
  border-top: 1px solid var(--vtc-gray-200);
  font-size: 12px;
  color: var(--vtc-gray-500);
}

.vtc-footer a {
  color: var(--vtc-orange);
  text-decoration: none;
  font-weight: 600;
}

.vtc-footer a:hover {
  text-decoration: underline;
}

/* Screen Reader Only - Visually Hidden */
.vtc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Email Gate Modal */
.vtc-email-gate {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.vtc-email-modal {
  background: white;
  border-radius: var(--vtc-radius-lg);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: vtc-modal-in 0.3s ease-out;
}

@keyframes vtc-modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.vtc-email-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--vtc-orange);
}

.vtc-email-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--vtc-gray-900);
  margin-bottom: 8px;
}

.vtc-email-subtitle {
  font-size: 14px;
  color: var(--vtc-gray-600);
  margin-bottom: 24px;
}

.vtc-email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vtc-email-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 1px solid var(--vtc-gray-300);
  border-radius: var(--vtc-radius);
  transition: all var(--vtc-transition);
}

.vtc-email-input:focus {
  outline: none;
  border-color: var(--vtc-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.vtc-email-input.vtc-error {
  border-color: #ef4444;
}

.vtc-email-error {
  font-size: 13px;
  color: #ef4444;
  text-align: left;
}

.vtc-email-submit {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--vtc-orange) 0%, var(--vtc-orange-dark) 100%);
  border: none;
  border-radius: var(--vtc-radius);
  cursor: pointer;
  transition: all var(--vtc-transition);
}

.vtc-email-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.vtc-email-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.vtc-email-privacy {
  font-size: 11px;
  color: var(--vtc-gray-500);
  margin-top: 12px;
}

.vtc-results-wrapper {
  position: relative;
}
