/* Visual Wheel Search Engine - Stylesheet (Dual Theme Dark & Light) */

.vsearch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vsearch-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.vsearch-modal {
  width: 100%;
  max-width: 680px;
  background: var(--panel-bg, #0f1219);
  border: 1px solid var(--panel-border, rgba(212, 175, 55, 0.25));
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.15);
  padding: 24px;
  color: var(--text-main, #eee);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body:not(.dark-mode) .vsearch-modal {
  background: #ffffff;
  border-color: rgba(201, 162, 39, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 0 20px rgba(201, 162, 39, 0.1);
  color: #111111;
}

.vsearch-overlay.is-active .vsearch-modal {
  transform: translateY(0) scale(1);
}

.vsearch-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: 0.2s ease;
}

body:not(.dark-mode) .vsearch-close {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.05);
  color: #222;
}

.vsearch-close:hover {
  background: #d4af37;
  color: #000;
  border-color: transparent;
}

.vsearch-header {
  margin-bottom: 20px;
  padding-right: 40px;
}

.vsearch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.vsearch-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: var(--text-main, #fff);
}

body:not(.dark-mode) .vsearch-title {
  color: #111;
}

.vsearch-dropzone {
  border: 2px dashed rgba(212, 175, 55, 0.35);
  border-radius: 18px;
  padding: 32px 20px;
  text-align: center;
  background: rgba(212, 175, 55, 0.03);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.vsearch-dropzone:hover,
.vsearch-dropzone.dragover {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.vsearch-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  color: #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}

.vsearch-drop-text {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-main, #eee);
}

body:not(.dark-mode) .vsearch-drop-text {
  color: #333;
}

.vsearch-actions-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.vsearch-btn-action {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold, #d4af37);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s ease;
}

.vsearch-btn-action:hover {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #000;
  border-color: transparent;
}

.vsearch-preview-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

body:not(.dark-mode) .vsearch-preview-wrap {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.vsearch-preview-img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--gold, #d4af37);
}

.vsearch-preview-info {
  flex: 1;
}

.vsearch-scanning-bar {
  height: 6px;
  width: 100%;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  margin-top: 10px;
}

.vsearch-scanning-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  animation: vsearchScan 1.2s infinite ease-in-out;
}

@keyframes vsearchScan {
  0% { left: -40%; }
  100% { left: 100%; }
}

.vsearch-status-box {
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vsearch-status-box.exact {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #10b981;
}

.vsearch-status-box.similar {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #eab308;
}

.vsearch-status-box.none {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.vsearch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.vsearch-item {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: 0.2s ease;
}

body:not(.dark-mode) .vsearch-item {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

.vsearch-item:hover {
  transform: translateY(-2px);
  border-color: var(--gold, #d4af37);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.vsearch-score-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #000;
  font-size: 10px;
  font-weight: 900;
  z-index: 2;
}

.vsearch-item-img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  margin-bottom: 10px;
}

.vsearch-item-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--text-main, #eee);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body:not(.dark-mode) .vsearch-item-title {
  color: #222;
}

.vsearch-item-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body:not(.dark-mode) .vsearch-item-foot {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.vsearch-item-price {
  font-weight: 800;
  font-size: 15px;
  color: var(--gold, #d4af37);
}

.vsearch-item-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #d4af37, #ba9533);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.vsearch-wa-card {
  text-align: center;
  padding: 24px;
  border-radius: 18px;
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.3);
  margin-top: 16px;
}

.vsearch-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  background: #25d366;
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  margin-top: 12px;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
  transition: 0.2s ease;
}

.vsearch-wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.42);
  filter: brightness(1.05);
}
