/* Template preview — app/template-preview.tsx (original styling). */

.screen-preview {
  background: var(--charcoal);
  color: #fff;
}

.screen-preview .preview-media {
  position: absolute;
  inset: 0;
}

/* Dark while the photos load (the screen behind them is charcoal). */
.screen-preview .scanner {
  background: var(--charcoal);
}

.screen-preview .preview-scrim {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.screen-preview .preview-scrim.top {
  top: 0;
  height: 140px;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.screen-preview .preview-scrim.bottom {
  bottom: 0;
  height: 280px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.65));
}

.screen-preview .preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: calc(var(--safe-top) + 8px);
  padding-bottom: calc(var(--safe-bottom) + 8px);
}

.screen-preview .preview-close-row {
  padding: 0 var(--s-lg);
  flex-shrink: 0;
}

/* 36px button, 44px tap target. */
.screen-preview .preview-close {
  position: relative;
}
.screen-preview .preview-close::after {
  content: '';
  position: absolute;
  inset: -4px;
}

.screen-preview .preview-footer {
  padding: 0 var(--s-lg) var(--s-md);
}

.screen-preview .preview-title-row {
  display: flex;
  align-items: center;
  gap: var(--s-xs);
  margin-bottom: var(--s-xs);
  min-width: 0;
}

.screen-preview .preview-title-row ion-icon {
  font-size: 22px;
  color: #fff;
  /* optically centre on the cap height of the 26px title */
  transform: translateY(-1px);
}

.screen-preview .preview-title {
  margin: 0;
  color: #fff;
  min-width: 0;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.18);
}

.screen-preview .preview-desc {
  margin: 0 0 var(--s-lg);
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.18);
}

/* Unknown template id. */
.screen-preview.is-missing {
  background: var(--bg);
  color: var(--text);
  padding-top: calc(var(--safe-top) + 8px);
  padding-bottom: calc(var(--safe-bottom) + 8px);
}

.screen-preview .preview-missing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-xl);
  padding: 0 var(--s-xl) 80px;
  text-align: center;
}

.screen-preview .preview-missing p {
  margin: 0;
  color: var(--text-2);
}

.screen-preview .preview-missing .btn {
  width: 70%;
}
