/* ============================================================
   Canonical Card Search — Scope Pills, Autosuggest, Placeholders
   Style: Spellbox Storm (Cyberpunk Organic / White Lab)
   ============================================================ */

/* Ensure #search is positioning context for dropdown */
#search { position: relative; }

/* --- Scope Pills (shared between header and results page) --- */
.ccs-scope-pills {
  display: flex;
  gap: 6px;
  padding: 6px 0 2px;
  flex-wrap: wrap;
}

.ccs-scope-pills-results {
  margin-right: auto;
}

.ccs-scope-pill {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 12px;
  border: 1px solid rgba(98, 0, 234, 0.18);
  border-radius: 14px 3px 14px 3px; /* Storm asymmetric */
  background: #fff;
  color: #596882;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.5;
}

.ccs-scope-pill:hover {
  border-color: var(--accent-primary, #6200ea);
  color: var(--accent-primary, #6200ea);
}

.ccs-scope-pill.active {
  background: var(--accent-primary, #6200ea);
  color: #fff;
  border-color: var(--accent-primary, #6200ea);
  font-weight: 600;
}

/* --- Autosuggest Dropdown --- */
.ccs-suggest-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: auto;
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(98, 0, 234, 0.12);
  border-radius: 4px 14px 14px 4px; /* Storm asymmetric */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  z-index: 1060;
  padding: 4px 0;
}

.ccs-suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #2d3748;
  transition: background 0.1s;
}

.ccs-suggest-item:hover {
  background: #f4f0ff;
}

.ccs-suggest-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 8px 2px 8px 2px; /* Storm micro-asymmetric */
  color: #fff;
  flex-shrink: 0;
  line-height: 1.5;
}

.ccs-suggest-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ccs-suggest-separator {
  height: 1px;
  background: rgba(98, 0, 234, 0.08);
  margin: 4px 12px;
}

/* --- Placeholder Cards (search results "All" mode) --- */
.ccs-placeholders-section {
  margin-bottom: 16px;
}

.ccs-placeholders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.ccs-placeholder-card {
  background: #fff;
  border: 1px solid rgba(98, 0, 234, 0.10);
  border-radius: 18px 4px 24px 4px; /* Storm organic */
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.ccs-placeholder-card:hover {
  border-color: var(--accent-primary, #6200ea);
  box-shadow: 0 4px 16px rgba(98, 0, 234, 0.12);
  text-decoration: none;
  color: inherit;
}

.ccs-placeholder-card .ccs-ph-image {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 12px 2px 16px 2px;
  margin-bottom: 8px;
}

.ccs-placeholder-card .ccs-ph-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 6px;
  line-height: 1.3;
}

.ccs-placeholder-card .ccs-ph-badges {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.ccs-placeholder-card .ccs-ph-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 8px 2px 8px 2px;
  color: #fff;
  line-height: 1.5;
}

.ccs-placeholder-card .ccs-ph-badge-mtg { background: #6200ea; }
.ccs-placeholder-card .ccs-ph-badge-pokemontcg { background: #f59e0b; }

.ccs-placeholder-card .ccs-ph-price {
  font-size: 12px;
  color: #718096;
  margin-bottom: 8px;
}

.ccs-placeholder-card .ccs-ph-cta {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary, #6200ea);
  border: 1px solid rgba(98, 0, 234, 0.25);
  border-radius: 10px 3px 10px 3px;
  padding: 4px 14px;
  transition: all 0.15s;
}

.ccs-placeholder-card:hover .ccs-ph-cta {
  background: var(--accent-primary, #6200ea);
  color: #fff;
  border-color: var(--accent-primary, #6200ea);
}

/* --- Canonical mode heading --- */
.ccs-canonical-heading {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #596882;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.ccs-canonical-heading .ccs-ch-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px 2px 8px 2px;
  color: #fff;
  vertical-align: middle;
  margin-right: 6px;
}

/* --- Responsive --- */
@media (max-width: 767px) {
  .ccs-suggest-dropdown {
    width: calc(100vw - 30px);
    right: auto;
    left: 0;
  }

  .ccs-placeholders-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ccs-scope-pill {
    font-size: 10px;
    padding: 2px 8px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .ccs-placeholders-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Advanced Search link in suggest dropdown --- */
.ccs-suggest-advanced {
  border-top: 1px solid rgba(98,0,234,0.1);
  padding: 8px 14px;
  text-align: center;
  background: linear-gradient(135deg, rgba(98,0,234,0.03), rgba(170,0,255,0.03));
}
.ccs-suggest-advanced-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6200ea;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.2s;
  animation: ccsAdvancedPulse 2s ease-in-out infinite;
}
.ccs-suggest-advanced-link:hover {
  color: #aa00ff;
  text-decoration: none;
}
.ccs-advanced-arrow {
  display: inline-block;
  animation: ccsArrowBounce 1.5s ease-in-out infinite;
  margin-left: 2px;
}
@keyframes ccsAdvancedPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
@keyframes ccsArrowBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}


/* --- Advanced Search button inside header search input-group --- */
.header-adv-btn {
  background: rgba(98,0,234,0.06) !important;
  border-color: rgba(98,0,234,0.2) !important;
  color: #6200ea !important;
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.header-adv-btn:hover {
  background: #6200ea !important;
  color: #fff !important;
  border-color: #6200ea !important;
}
.header-adv-btn i { font-size: 12px; }
