/* Marketing Price Mapper - Frontend Gift Progress v1.6.0
 * Minimal Apple-style design
 */
:root {
  --mkt-gift-bg: #ffffff;
  --mkt-gift-text: #0b1220;
  --mkt-gift-muted: #6b7280;
  --mkt-gift-accent: #2a73ff;
  --mkt-gift-border: #e5e7eb;
  --mkt-gift-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);

  --mkt-gift-progress-bg: #f3f4f6;
  --mkt-gift-progress-fill: #2a73ff;

  --mkt-gift-radius: 18px;
  --mkt-gift-font-size: 14px;
  --mkt-gift-title-size: 16px;
  --mkt-gift-upsell-size: 13px;

  --mkt-gift-gap: 14px;
  --mkt-gift-pad: 14px;

  --mkt-gift-thumb-size: clamp(52px, 8vw, 64px);
}

/* Wrapper for dynamic updates */
.mkt-gift-wrapper {
  transition: opacity 0.3s ease;
}

/* Card - Premium deluxe design */
.mkt-gift-card {
  background: var(--mkt-gift-bg);
  border: 1px solid var(--mkt-gift-border);
  border-radius: var(--mkt-gift-radius);
  padding: var(--mkt-gift-pad);
  box-shadow: var(--mkt-gift-shadow), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  color: var(--mkt-gift-text);
  font-size: var(--mkt-gift-font-size);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  margin: 20px 0;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
}

.mkt-gift-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  transform: translateY(-2px);
}

/* Row */
.mkt-gift-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--mkt-gift-gap);
}

.mkt-gift-content {
  min-width: 0;
}

/* Thumbnail - Premium with subtle effects */
.mkt-gift-thumb {
  display: grid;
  place-items: center;
  width: var(--mkt-gift-thumb-size);
  height: var(--mkt-gift-thumb-size);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--mkt-gift-border);
  background: linear-gradient(180deg, #fff, #fbfbfb);
  transition: transform .2s ease, box-shadow .3s ease, border-color .3s ease;
  flex-shrink: 0;
  text-decoration: none;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mkt-gift-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .3s ease;
}

.mkt-gift-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.mkt-gift-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(42, 115, 255, 0.15);
  border-color: rgba(42, 115, 255, 0.3);
}

.mkt-gift-thumb:hover::after {
  opacity: 1;
}

.mkt-gift-thumb:hover img {
  transform: scale(1.05);
}

/* Icon fallback */
.mkt-gift-icon {
  width: var(--mkt-gift-thumb-size);
  height: var(--mkt-gift-thumb-size);
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--mkt-gift-border);
  background: #fff;
  flex-shrink: 0;
  color: var(--mkt-gift-accent);
}

/* Titles / text - Premium typography */
.mkt-gift-title {
  font-weight: 600;
  font-size: var(--mkt-gift-title-size);
  margin-bottom: 4px;
  color: var(--mkt-gift-text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.mkt-gift-text {
  color: var(--mkt-gift-text);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* Product link - Elegant underline */
.mkt-gift-link {
  text-decoration: none;
  color: var(--mkt-gift-accent);
  font-weight: 500;
  border-bottom: 1.5px solid rgba(42, 115, 255, 0.3);
  transition: all .2s ease;
  position: relative;
}

.mkt-gift-link:hover {
  border-bottom-color: var(--mkt-gift-accent);
  color: #1a5ed9;
  letter-spacing: 0.01em;
}

.mkt-gift-name {
  display: inline-block;
  vertical-align: bottom;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress bar - Premium with gradient and glow */
.mkt-gift-progress {
  display: none;
  margin-top: 14px;
  position: relative;
  height: 8px;
  background: var(--mkt-gift-progress-bg);
  border-radius: 999px;
  overflow: visible;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mkt-gift-progress .mkt-gift-bar {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2a73ff, #5a94ff);
  transition: width .5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(42, 115, 255, 0.3), 0 0 2px rgba(42, 115, 255, 0.5);
  position: relative;
}

.mkt-gift-progress .mkt-gift-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
  border-radius: 999px;
}

/* Upsell message - Premium Apple-style */
.mkt-gift-upsell {
  margin-top: 12px;
  color: var(--mkt-gift-text);
  background: linear-gradient(135deg, rgba(42, 115, 255, 0.05), rgba(42, 115, 255, 0.08));
  border: 1px solid rgba(42, 115, 255, 0.15);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: var(--mkt-gift-upsell-size);
  line-height: 1.6;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(42, 115, 255, 0.08);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.mkt-gift-upsell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.mkt-gift-upsell:hover {
  border-color: rgba(42, 115, 255, 0.25);
  box-shadow: 0 4px 12px rgba(42, 115, 255, 0.12);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 640px) {
  .mkt-gift-name {
    max-width: 28ch;
  }

  .mkt-gift-row {
    grid-template-columns: auto 1fr;
  }
}
