:root {
  --wpvs-bg: #ffffff;
  --wpvs-card: #ffffff;
  --wpvs-soft: #e5e7eb;
  --wpvs-text: #0f172a;
  --wpvs-muted: #475569;
  --wpvs-accent: #0ea5e9;  /* cyan-500 */
  --wpvs-accent-2: #6366f1; /* indigo-500 */
}

.wpvs { color: var(--wpvs-text); background: var(--wpvs-bg); padding: 16px; border-radius: 14px; box-shadow: 0 6px 20px rgba(2,6,23,.06); }
.wpvs * { box-sizing: border-box; }
.wpvs-header h3 { margin: 0 0 12px 0; font-weight: 700; letter-spacing: .2px; }

/* Mobile-first layout */
.wpvs-controls { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
@media (min-width: 640px) { .wpvs-controls { grid-template-columns: 2fr 1fr 1fr 1fr auto; } }
@media (min-width: 1024px) { .wpvs-controls { grid-template-columns: 3fr 1fr 1fr 1fr auto; } }

/* Layout enxuto quando usado o shortcode apenas com caixa de busca */
.wpvs.wpvs--box .wpvs-controls { grid-template-columns: 1fr; }
@media (min-width: 640px) { .wpvs.wpvs--box .wpvs-controls { grid-template-columns: 1fr auto; } }
@media (min-width: 1024px) { .wpvs.wpvs--box .wpvs-controls { grid-template-columns: 1fr auto; } }

.wpvs input.wpvs-query, .wpvs select { background: var(--wpvs-card); color: var(--wpvs-text); border: 1px solid var(--wpvs-soft); outline: none; padding: 12px 14px; border-radius: 10px; transition: border-color .2s ease, box-shadow .2s ease, transform .06s ease; width: 100%; }
.wpvs input.wpvs-query:focus, .wpvs select:focus { border-color: var(--wpvs-accent); box-shadow: 0 0 0 3px rgba(14,165,233,.2); }
.wpvs input.wpvs-query:active, .wpvs select:active { transform: translateY(1px); }

.wpvs-suggest { background: var(--wpvs-card); border: 1px solid var(--wpvs-soft); border-radius: 12px; margin-bottom:10px; max-height: 220px; overflow:auto; }
.wpvs-sug { padding: 10px 12px; cursor: pointer; transition: background .2s ease; }
.wpvs-sug:hover { background: #f8fafc; }

/* Ocultar sugestões quando o shortcode sem sugestões for usado */
.wpvs.wpvs--no-suggest .wpvs-suggest { display: none !important; }

.wpvs-summary-card { background: linear-gradient(135deg, rgba(14,165,233,.10), rgba(99,102,241,.10)); border: 1px solid var(--wpvs-soft); border-radius: 12px; padding: 12px; margin: 8px 0 12px 0; }
.wpvs-summary mark { background: transparent; color: var(--wpvs-accent); font-weight: 700; }

.wpvs-results { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .wpvs-results { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .wpvs-results { grid-template-columns: 1fr 1fr 1fr; } }

.wpvs-item { padding: 14px; border: 1px solid var(--wpvs-soft); border-radius: 12px; background: #ffffff; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.wpvs-item .wpvs-item-main { font-size: 16px; line-height: 1.3; }
.wpvs-item .wpvs-item-meta { font-size: 13px; color: var(--wpvs-muted); margin-top: 4px; }
.wpvs-item-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.wpvs .badge { background: #f8fafc; padding: 4px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--wpvs-soft); white-space: normal; overflow-wrap: anywhere; }

.wpvs-empty { padding: 14px; border: 1px dashed var(--wpvs-soft); border-radius: 12px; color: var(--wpvs-muted); text-align: center; }

.wpvs-more { appearance: none; border: none; background: var(--wpvs-btn-bg, #00b4ff); color: #fff; padding: 10px 14px; border-radius: 10px; cursor: pointer; transition: background-color .2s ease, transform .08s ease; margin-top: 10px; }
.wpvs-more:hover, .wpvs-more:focus { background: var(--wpvs-btn-hover, #0095e0); color: #fff; }
.wpvs-more:active { transform: translateY(1px); }
.wpvs-more[hidden] { display: none !important; }

/* Clear button */
.wpvs-clear { appearance: none; border: none; background: var(--wpvs-btn-bg, #00b4ff); color: #fff; width: 100%; height: 50px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .2s ease, box-shadow .2s ease, transform .06s ease, color .2s ease; }
@media (min-width: 640px) { .wpvs-clear { width: 50px; } }
.wpvs-clear:hover, .wpvs-clear:focus { background: var(--wpvs-btn-hover, #0095e0); color: #fff; box-shadow: 0 0 0 3px rgba(0,149,183,.2); }
.wpvs-clear:active { transform: translateY(1px); }
.wpvs-clear svg, .wpvs-clear img { width: 28px; height: 28px; object-fit: contain; }
@media (min-width: 640px) { .wpvs-clear svg, .wpvs-clear img { width: 32px; height: 32px; } }
.wpvs-clear.is-active { background: var(--wpvs-clear-active, #ef4444); }
.wpvs-clear.is-active:hover, .wpvs-clear.is-active:focus { background: var(--wpvs-clear-active-hover, #dc2626); box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
button.wpvs-clear { padding: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Loading state */
.wpvs.is-loading .wpvs-results { position: relative; }
.wpvs.is-loading .wpvs-results::after { content: ''; position: absolute; inset: 0; border-radius: 12px; background: linear-gradient(90deg, transparent, rgba(2,6,23,.06), transparent); animation: shimmer 1s linear infinite; }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: 200px 0; } }

/* Fade animation */
.animate-fade { animation: fadeInUp .24s ease both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
