/* ════════════════════════════════════════
   SMART DOWNLOAD MENU — Premium UI/UX
   ════════════════════════════════════════ */

.cv-export-container {
  position: fixed;
  top: 85px; /* Safely below the glass navbar */
  left: 30px;
  z-index: 1000;
  font-family: 'Inter', sans-serif;
  perspective: 1000px;
}

/* Main Trigger Button — The "Action" Hub */
.cv-export-main-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B3A6B 0%, #2E5FA3 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 15px rgba(27, 58, 107, 0.4),
    0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.cv-export-main-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  animation: pulse-ring 2s infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.cv-export-main-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 35px rgba(27, 58, 107, 0.5);
  background: linear-gradient(135deg, #2E5FA3 0%, #1B3A6B 100%);
}

.cv-export-main-btn svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* The Menu Box — Sleek Glassmorphism */
.cv-export-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 
    0 20px 50px rgba(0,0,0,0.15),
    0 0 0 1px rgba(255,255,255,0.5);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translate(-20px, -20px);
  transform-origin: top left;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.cv-export-container.active .cv-export-menu {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translate(0, 0);
}

.cv-export-container.active .cv-export-main-btn {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}

/* Menu Header */
.cv-export-header {
  background: rgba(248, 250, 252, 0.5);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.cv-export-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e293b;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.cv-export-filename {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.cv-export-close {
  width: 28px;
  height: 28px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cv-export-close:hover {
  background: #fee2e2;
  color: #ef4444;
  transform: rotate(90deg);
}

/* Menu Body */
.cv-export-body {
  padding: 18px 16px;
}

.cv-export-prompt {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.cv-export-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-export-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.cv-option-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #64748b;
  transition: all 0.3s ease;
}

.cv-export-option-btn:hover {
  transform: translateX(6px);
  border-color: #1B3A6B;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Specific Option Styles */
.cv-export-option-btn.pdf:hover {
  background: #fffafa;
  border-color: #fca5a5;
  color: #b91c1c;
}

.cv-export-option-btn.pdf:hover .cv-option-icon {
  color: #ef4444;
  transform: scale(1.1);
}

.cv-export-option-btn.word:hover {
  background: #f8fbff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.cv-export-option-btn.word:hover .cv-option-icon {
  color: #2563eb;
  transform: scale(1.1);
}

/* Loading / Processing State */
.cv-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: cv-spin 0.8s linear infinite;
}

@keyframes cv-spin {
  to { transform: rotate(360deg); }
}

/* Responsive Handling */
@media (max-width: 768px) {
  .cv-export-container {
    top: auto;
    bottom: 30px;
    left: 20px;
  }
  
  .cv-export-menu {
    top: auto;
    bottom: 0;
    width: calc(100vw - 40px);
    max-width: 340px;
    transform-origin: bottom left;
  }
}

/* Dark Mode Integration */
[data-theme="dark"] .cv-export-menu {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(255,255,255,0.1);
  color: #f1f5f9;
}

[data-theme="dark"] .cv-export-header {
  background: rgba(15, 23, 42, 0.5);
  border-bottom-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .cv-export-file-info {
  color: #f1f5f9;
}

[data-theme="dark"] .cv-export-option-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

[data-theme="dark"] .cv-export-close {
  background: #334155;
  color: #94a3b8;
}
