/* Advoke CV — Editor PDF Export UI */

.pdf-export {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
}

.pdf-export__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pdf-export__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0;
}

.pdf-export__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.pdf-export__option {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  background-color: var(--white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-colors);
  text-align: left;
  position: relative;
  min-height: 68px;
}

.pdf-export__option:hover {
  border-color: var(--color-accent);
  background-color: var(--color-accent-tint);
}

.pdf-export__option:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

.pdf-export__option[aria-pressed="true"],
.pdf-export__option.is-active {
  border-color: var(--color-accent);
  background-color: var(--color-accent-soft);
  box-shadow: 0 0 0 2px var(--color-accent-tint);
}

.pdf-export__option[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 11px;
  font-weight: var(--font-weight-black);
  color: var(--color-accent-active);
}

.pdf-export__option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background-color: var(--white);
  color: var(--color-accent-active);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-1);
}

.pdf-export__option-icon svg {
  width: 14px;
  height: 14px;
}

.pdf-export__option-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  line-height: 1.3;
  margin: 0;
}

.pdf-export__option-desc {
  font-size: var(--text-2xs);
  color: var(--color-text-muted);
  line-height: 1.3;
  margin: 0;
}

.pdf-export__preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-3);
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.pdf-export__preview strong {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
}

.pdf-export__preview-icon {
  width: 32px;
  height: 32px;
  color: var(--color-accent-active);
  margin-bottom: var(--space-1);
}

.pdf-export__tip {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background-color: var(--color-accent-tint);
  border: 1px solid var(--yellow-200);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.pdf-export__tip svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent-active);
  flex-shrink: 0;
  margin-top: 1px;
}

.pdf-export__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-subtle);
}

.pdf-export__actions .btn {
  width: 100%;
  min-height: 48px;
}

.pdf-export__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background-color: var(--color-success-bg);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-success);
  line-height: 1.4;
  font-weight: var(--font-weight-medium);
}

.pdf-export__status svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.pdf-export__status--error {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
}

.pdf-export__status--loading {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
}

.pdf-export__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--radius-full);
  animation: editor-spin 700ms linear infinite;
  flex-shrink: 0;
}

.pdf-export__shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  font-size: var(--text-2xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.pdf-export__shortcut {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pdf-export__kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 var(--space-1);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  background-color: var(--white);
  border: 1px solid var(--color-border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.print-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--white);
  z-index: var(--z-max);
  display: none;
  overflow: auto;
}

.print-overlay.is-open {
  display: block;
}

.print-overlay__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6);
  gap: var(--space-4);
}

@media print {
  .print-overlay {
    display: block !important;
    position: static;
    background-color: transparent;
    overflow: visible;
  }
  .print-overlay__body {
    padding: 0;
    gap: 0;
  }
  .editor-toolbar,
  .editor-mobile-tabs,
  .editor-sidebar,
  .editor-preview__toolbar,
  .editor-panel__header,
  .editor-panel__footer,
  .pdf-export,
  .site-header,
  .site-footer {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdf-export__option,
  .pdf-export__spinner {
    transition: none;
    animation: none;
  }
}