/* ============================================
   VEVGA Result View — Shared Component
   Used across all file-processing tools
   ============================================ */

.result-view {
  display: none; /* hidden by default, shown via .result-view.active */
  background: white;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  margin-top: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  animation: resultFadeIn 0.4s ease-out;
}

.result-view.active {
  display: block;
}

@keyframes resultFadeIn {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Success header with icon */
.result-success {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.result-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12); /* green tint default */
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.result-success-icon svg {
  width: 28px;
  height: 28px;
}

@keyframes iconPop {
  0%   { transform: scale(0); }
  100% { transform: scale(1); }
}

.result-success-text h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #161922;
  margin: 0 0 0.125rem 0;
}

.result-success-text p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

/* Stats grid */
.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.result-stat {
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  text-align: center;
}

.result-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.result-stat-value {
  font-family: 'Manrope', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #161922;
}

.result-stat-value.success {
  color: #10b981;
}

/* Download button — big and prominent */
.result-download {
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  background: var(--primary, #2563eb);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.result-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}

.result-download:active {
  transform: translateY(0);
}

.result-download svg {
  width: 20px;
  height: 20px;
}

/* Secondary actions row */
.result-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.result-actions button,
.result-actions a {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: white;
  color: #161922;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}

.result-actions button:hover,
.result-actions a:hover {
  background: #f8fafc;
}

/* Reserved ad slot (empty for now) */
.result-ad-slot {
  margin-top: 1.5rem;
  min-height: 0;
  /* When AdSense lands, set min-height: 250px (rect) or 90px (banner). */
}

.result-ad-slot:empty {
  display: none;
}

/* Mobile fine-tuning (base styles are already mobile-first) */
@media (max-width: 480px) {
  .result-view {
    padding: 1.5rem 1rem;
  }
  .result-success-text h3 {
    font-size: 1.125rem;
  }
  .result-stats {
    grid-template-columns: repeat(2, 1fr); /* always 2 cols on mobile, never 1 */
    gap: 0.5rem;
  }
  .result-stat {
    padding: 0.75rem 0.5rem;
  }
  .result-stat-value {
    font-size: 1rem;
  }
  .result-download {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
  .result-actions {
    flex-direction: column;
  }
}

/* Tool-specific accent overrides — apply via .result-view.tool-pdf etc. */
.result-view.tool-pdf     .result-success-icon { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.result-view.tool-image   .result-success-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.result-view.tool-convert .result-success-icon { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }
.result-view.tool-video   .result-success-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.result-view.tool-qr      .result-success-icon { background: rgba(99, 102, 241, 0.12); color: #6366f1; }

.result-view.tool-pdf     .result-download { background: #f97316; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25); }
.result-view.tool-image   .result-download { background: #10b981; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25); }
.result-view.tool-convert .result-download { background: #14b8a6; box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25); }
.result-view.tool-video   .result-download { background: #ef4444; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25); }
.result-view.tool-qr      .result-download { background: #6366f1; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25); }
