/* HI Quote Widget Styles
 * Mobile-first, clean design that can be embedded on any site
 */

.hiqw-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.hiqw-container *,
.hiqw-container *::before,
.hiqw-container *::after {
  box-sizing: border-box;
}

/* Status & Error Messages */
.hiqw-status {
  padding: 16px;
  text-align: center;
  color: #666;
}

.hiqw-error {
  display: none;
  padding: 16px;
  margin: 16px 0;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  text-align: center;
}

/* Grid Layout */
.hiqw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

/* Card Styles */
.hiqw-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hiqw-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.hiqw-card__header {
  padding: 18px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e5e7eb;
}

.hiqw-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hiqw-card__body {
  padding: 20px 16px 18px;
}

.hiqw-card__section {
  margin-bottom: 18px;
  text-align: center;
}

.hiqw-card__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
}

.hiqw-card__value {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
}

.hiqw-card__best-value {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  background: #eff6ff;
  border-radius: 12px;
  margin-bottom: 18px;
  text-align: center;
}

.hiqw-card__best-value-label,
.hiqw-card__best-value-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hiqw-card__best-value-rate {
  font-size: 22px;
  font-weight: 700;
  color: #1d4ed8;
}

.hiqw-card__benefit {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.hiqw-card__riders {
  font-size: 13px;
  color: #475569;
}

.hiqw-card__riders-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.hiqw-card__riders-list {
  display: block;
  line-height: 1.6;
  word-break: break-word;
}

/* Stats Grid */
.hiqw-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hiqw-stat {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}
.hiqw-stat__label,
.hiqw-stat__value {
  text-align: center;
}
.hiqw-stat__label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 4px;
}

.hiqw-stat__value {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.hiqw-stat__value--highlight {
  color: #2563eb;
}

/* Empty State */
.hiqw-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-size: 15px;
}

/* Skeleton Loading */
.hiqw-skeleton {
  height: 12px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: hiqw-skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 6px;
  display: inline-block;
}

@keyframes hiqw-skeleton-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  .hiqw-container {
    padding: 12px;
  }

  .hiqw-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hiqw-stats {
    grid-template-columns: 1fr;
  }

  .hiqw-stat__value {
    font-size: 16px;
  }
}

@media (min-width: 768px) {
  .hiqw-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hiqw-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
  .hiqw-container {
    color: #e5e5e5;
  }

  .hiqw-card {
    background: #1f2937;
    border-color: #374151;
  }

  .hiqw-card__header {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-color: #374151;
  }

  .hiqw-card__title {
    color: #f3f4f6;
  }

  .hiqw-card__label {
    color: #cbd5e1;
  }

  .hiqw-card__value {
    color: #f3f4f6;
  }

  .hiqw-card__best-value {
    /*background: #1e293b;*/
    border-color: #374151;
  }

  .hiqw-card__best-value-rate {
    color: #60a5fa;
  }

  .hiqw-card__benefit {
    color: #f3f4f6;
  }

  .hiqw-card__riders {
    color: #cbd5e1;
  }

  .hiqw-card__riders-label {
    color: #9ca3af;
  }

  .hiqw-stat {
    background: #111827;
  }

  .hiqw-stat__label {
    color: #9ca3af;
  }

  .hiqw-stat__value {
    color: #f3f4f6;
  }

  .hiqw-stat__value--highlight {
    color: #60a5fa;
  }

  .hiqw-empty {
    color: #9ca3af;
  }

  .hiqw-skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
  }
}