﻿/* ========================================
   CV BASE STYLES - UI & Aplikacja
   Odpowiada za tło, skalowanie i cienie na ekranie.
   Nigdy nie trafia do wydruku!
   ======================================== */



.viewport-background {
  background-color: var(--mud-palette-surface, #525659);
  width: 100%;
  min-height: 100vh;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 2rem;
  box-sizing: border-box;
}

.preview-scaler {
  transform-origin: top center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.scalable-content {
  position: relative;
  transform-origin: top center;
  transition: transform 0.2s ease-out;
  background-color: white;
  width: 210mm;
  min-height: 297mm; /* Na ekranie ZAWSZE wysokość A4 */
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-left: auto;
  margin-right: auto;
  transform: scale(1);
}

@container (max-width: 900px) {
  .scalable-content {
    transform: scale(0.85);
  }
}

@container (max-width: 700px) {
  .scalable-content {
    transform: scale(0.7);
  }
}

@container (max-width: 500px) {
  .scalable-content {
    transform: scale(0.5);
  }
}

.cv-page-image {
  width: 100%;
  height: auto;
  background-color: white;
  display: block;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.image-loading {
  opacity: 0.6;
  filter: grayscale(15%);
}

.updating-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  z-index: 10;
  font-weight: 500;
}
