/**
 * Clean Minimal Frontend - Subtle gradients, soft colors
 */

:root {
  --str-primary-color: #3b82f6;
  --str-primary-dark: #2563eb;
  --str-primary-darker: #1d4ed8;
}

.str-toplist-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.str-toplist-container * {
  box-sizing: border-box;
}

/* Card - Gradient border */
.str-toplist-item {
  position: relative;
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border-radius: 10px;
  margin-bottom: 14px;
  transition: all .12s ease;
  overflow: hidden;
  border: 1px solid transparent;
  background-image: linear-gradient(#ffffff, #ffffff),
                    linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.str-toplist-item:hover {
  background-image: linear-gradient(#ffffff, #ffffff),
                    linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transform: translateY(-0.25px);
}

/* Rank Badge - Solid colors */
.str-toplist-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 28px;
  height: 28px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 0 7px;
  border-radius: 7px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  background: #10b981;
}

/* Top 1 - Gold */
.str-toplist-item[data-position="1"] .str-toplist-rank {
  background: #f59e0b;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

/* Top 2 - Silver */
.str-toplist-item[data-position="2"] .str-toplist-rank {
  background: #9ca3af;
  box-shadow: 0 2px 6px rgba(156, 163, 175, 0.4);
}

/* Top 3 - Bronze */
.str-toplist-item[data-position="3"] .str-toplist-rank {
  background: #ea580c;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.4);
}

/* Logo Column - Fill full height */
.str-toplist-logo-col {
  width: 140px;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.str-toplist-logo-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.str-toplist-logo {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}

.str-toplist-logo-placeholder {
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

/* Content Wrapper - Split content and actions */
.str-toplist-content-wrapper {
  flex: 1;
  display: flex;
  gap: 16px;
}

.str-toplist-content {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.str-toplist-title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Rating Row */
.str-toplist-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 30px;
}

.str-toplist-rating {
  display: flex;
  align-items: center;
}

.str-stars-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f9fafb;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid transparent;
  background-image: linear-gradient(#f9fafb, #f9fafb),
                    linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  height: 30px;
}

.str-rating-stars {
  display: flex;
  gap: 2px;
}

.str-star {
  font-size: 14px;
  color: #d1d5db;
}

.str-star.filled {
  color: #f59e0b;
}

.str-rating-text {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
}

.str-votes {
  font-size: 11px;
  color: #78350f;
  font-weight: 600;
}

/* Meta - Gray backgrounds with colored icons */
.str-toplist-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 11px;
}

.str-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  white-space: nowrap;
  background: #f3f4f6;
  border: 1px solid transparent;
  background-image: linear-gradient(#f3f4f6, #f3f4f6),
                    linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  padding: 4px 9px;
  border-radius: 7px;
  transition: all 0.12s;
  height: 30px;
  color: #374151;
}

.str-meta-item:hover {
  background-image: linear-gradient(#e5e7eb, #e5e7eb),
                    linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
}

.str-meta-item svg {
  width: 13px !important;
  height: 13px !important;
  flex-shrink: 0;
  color: #10b981;
}

.str-icon {
  width: 13px !important;
  height: 13px !important;
  flex-shrink: 0;
}

/* Badge Styles - Gradient borders with colored icons */
.str-badge-trusted {
  background: #f3f4f6;
  color: #1e40af;
  border: 1px solid transparent;
  background-image: linear-gradient(#f3f4f6, #f3f4f6),
                    linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.str-badge-trusted::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%233b82f6"><path fill-rule="evenodd" d="M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>') center/contain no-repeat;
}

.str-badge-editor_pick {
  background: #f3f4f6;
  color: #92400e;
  border: 1px solid transparent;
  background-image: linear-gradient(#f3f4f6, #f3f4f6),
                    linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.str-badge-editor_pick::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23f59e0b"><path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"/></svg>') center/contain no-repeat;
}

.str-badge-hot {
  background: #f3f4f6;
  color: #991b1b;
  border: 1px solid transparent;
  background-image: linear-gradient(#f3f4f6, #f3f4f6),
                    linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.str-badge-hot::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23ef4444"><path fill-rule="evenodd" d="M12.395 2.553a1 1 0 00-1.45-.385c-.345.23-.614.558-.822.88-.214.33-.403.713-.57 1.116-.334.804-.614 1.768-.84 2.734a31.365 31.365 0 00-.613 3.58 2.64 2.64 0 01-.945-1.067c-.328-.68-.398-1.534-.398-2.654A1 1 0 005.05 6.05 6.981 6.981 0 003 11a7 7 0 1011.95-4.95c-.592-.591-.98-.985-1.348-1.467-.363-.476-.724-1.063-1.207-2.03zM12.12 15.12A3 3 0 017 13s.879.5 2.5.5c0-1 .5-4 1.25-4.5.5 1 .786 1.293 1.371 1.879A2.99 2.99 0 0113 13a2.99 2.99 0 01-.879 2.121z" clip-rule="evenodd"/></svg>') center/contain no-repeat;
}

.str-badge-new {
  background: #f3f4f6;
  color: #15803d;
  border: 1px solid transparent;
  background-image: linear-gradient(#f3f4f6, #f3f4f6),
                    linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.str-badge-new::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%2322c55e"><path fill-rule="evenodd" d="M5 2a1 1 0 011 1v1h1a1 1 0 010 2H6v1a1 1 0 01-2 0V6H3a1 1 0 010-2h1V3a1 1 0 011-1zm0 10a1 1 0 011 1v1h1a1 1 0 110 2H6v1a1 1 0 11-2 0v-1H3a1 1 0 110-2h1v-1a1 1 0 011-1zM12 2a1 1 0 01.967.744L14.146 7.2 17.5 9.134a1 1 0 010 1.732l-3.354 1.935-1.18 4.455a1 1 0 01-1.933 0L9.854 12.8 6.5 10.866a1 1 0 010-1.732l3.354-1.935 1.18-4.455A1 1 0 0112 2z" clip-rule="evenodd"/></svg>') center/contain no-repeat;
}

/* Description */
.str-toplist-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}

/* Bonus & Highlight Row - Desktop same row */
.str-toplist-promo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.str-toplist-bonus,
.str-toplist-highlight {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  line-height: 1.5;
  padding: 7px 11px;
  border-radius: 7px;
  margin: 0;
  font-weight: 600;
  border: 1px solid transparent;
}

.str-toplist-bonus {
  color: #15803d;
  background: #f3f4f6;
  background-image: linear-gradient(#f3f4f6, #f3f4f6),
                    linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.str-toplist-bonus svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: #22c55e;
}

.str-toplist-highlight {
  color: #0369a1;
  background: #f3f4f6;
  background-image: linear-gradient(#f3f4f6, #f3f4f6),
                    linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.str-toplist-highlight svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: #0ea5e9;
}

/* Actions - Right column */
.str-toplist-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  justify-content: center;
  min-width: 180px;
}

.str-btn-secondary {
  width: 100%;
  min-height: 40px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid transparent;
  background-image: linear-gradient(#ffffff, #ffffff),
                    linear-gradient(135deg, #e5e7eb 0%, #cbd5e1 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: #374151;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all .15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.str-btn-secondary:hover {
  background-image: linear-gradient(#f9fafb, #f9fafb),
                    linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  color: #111827;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.str-btn-secondary:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.str-btn-secondary::before {
  content: '';
  display: inline-block;
  width: 15px;
  height: 15px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23374151"><path d="M10 12a2 2 0 100-4 2 2 0 000 4z"/><path fill-rule="evenodd" d="M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z" clip-rule="evenodd"/></svg>') center/contain no-repeat;
}

.str-btn-primary {
  width: 100%;
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--str-primary-color, #3b82f6) 0%, var(--str-primary-dark, #2563eb) 100%);
  border: none;
  color: #fff !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all .15s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.str-btn-primary:hover {
  background: linear-gradient(135deg, var(--str-primary-dark, #2563eb) 0%, var(--str-primary-darker, #1d4ed8) 100%);
  color: #fff !important;
  box-shadow: 0 3px 6px rgba(59, 130, 246, 0.3);
}

.str-btn-primary:focus-visible {
  outline: 2px solid var(--str-primary-color, #3b82f6);
  outline-offset: 2px;
}

.str-btn-primary::before {
  content: '';
  display: inline-block;
  width: 15px;
  height: 15px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23ffffff"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-8.707l-3-3a1 1 0 00-1.414 1.414L10.586 9H7a1 1 0 100 2h3.586l-1.293 1.293a1 1 0 101.414 1.414l3-3a1 1 0 000-1.414z" clip-rule="evenodd"/></svg>') center/contain no-repeat;
}

/* Mobile */
@media (max-width: 768px) {
  .str-toplist-item {
    flex-direction: column;
  }

  .str-toplist-logo-col {
    width: 100%;
    min-height: 100px;
  }

  .str-toplist-logo-wrapper {
    padding: 20px;
  }

  .str-toplist-content-wrapper {
    flex-direction: column;
  }

  .str-toplist-content {
    padding: 14px;
  }

  .str-toplist-title {
    font-size: 16px;
    text-align: center;
  }

  .str-toplist-rating-row {
    justify-content: center;
  }

  .str-toplist-meta {
    justify-content: center;
  }

  .str-toplist-desc {
    text-align: center;
    font-size: 12px;
  }

  .str-toplist-promo-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .str-toplist-bonus,
  .str-toplist-highlight {
    font-size: 12px;
  }

  .str-toplist-actions {
    width: 100%;
    padding: 14px;
    padding-top: 0;
  }

  .str-btn-primary,
  .str-btn-secondary {
    width: 100%;
    min-height: 48px;
    font-size: 14px;
  }
}
