/* Overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(7,16,37,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Popup */
.popup {
  background: linear-gradient(180deg, var(--card), #0a1424);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow), 0 25px 50px rgba(2,6,23,0.8);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden; /* avoid extra scroll */
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Header */
.popup-header {
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.popup-title { font-size: 18px; font-weight: 700; margin: 0; }
.popup-close {
  background: transparent; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; color: var(--muted);
  transition: all 0.2s ease;
}
.popup-close:hover { background: rgba(255,255,255,0.05); color: #e6eef8; }

/* Body */
.popup-body { 
  flex: 1; /* fill available space */
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 8px; /* minimal padding */
  overflow: hidden;
}

.image-preview-container {
  width: 100%; 
  height: 100%; 
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; 
  align-items: center; 
  justify-content: center;
  position: relative;
  background: var(--glass);
}
.resume-preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  display: block;
}

/* Placeholder */
.image-placeholder { 
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; 
  color: var(--muted); 
}
.placeholder-content { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* Footer */
.popup-footer { 
  padding: 8px 16px; 
  display: flex; 
  justify-content: flex-end; 
  gap: 8px; 
  border-top: 1px solid rgba(255,255,255,0.03); 
}
.popup-btn { padding: 8px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; border: none; transition: all 0.2s ease; }
.popup-btn.secondary { background: var(--glass); border: 1px solid rgba(255,255,255,0.03); color: #e6eef8; }
.popup-btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #052128; box-shadow: 0 8px 28px rgba(96,165,250,0.08); }
.popup-btn:hover { transform: translateY(-1px); }

/* Responsive */
@media (max-width:768px){ .popup{width:95%;} .resume-preview-image{max-height:80vh;} }
@media (max-width:480px){ .resume-preview-image{max-height:60vh;} }
