/* =========================================================
   FILE: /assets/css/modules/pdf/pdf-editor/export/fill-export-drawer.css
   ROLE: Fill Editor Save & Export drawer owner
   ========================================================= */

.ipdf-fill-export-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1800;
  background: rgba(15, 23, 42, .28);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 220ms ease;
}

.ipdf-fill-export-backdrop.is-open {
  opacity: 1;
}

.ipdf-fill-export-drawer,
.ipdf-fill-export-drawer * {
  box-sizing: border-box;
}

.ipdf-fill-shell .ipdf-fill-tool-group--finish,
.ipdf-fill-tool-group--finish {
  flex: 0 0 auto;
  min-width: 166px;
}

.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn,
.ipdf-fill-export-open-btn {
  align-items: center;
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  flex: 0 0 auto;
  flex-direction: row;
  gap: 8px;
  height: 40px;
  min-height: 40px;
  min-width: 160px;
  max-width: none;
  padding: 0 18px;
  width: auto;
}

.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn:hover:not(:disabled):not(.is-disabled),
.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn.is-active,
.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn[aria-pressed="true"] {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: none;
  color: #ffffff;
}

.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn:disabled,
.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn[aria-busy="true"],
.ipdf-fill-export-open-btn:disabled,
.ipdf-fill-export-open-btn[aria-busy="true"] {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  cursor: wait;
  opacity: 1;
}

.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn .ipdf-fill-google-icon,
.ipdf-fill-export-open-btn .ipdf-fill-google-icon {
  color: #ffffff;
  font-size: 21px;
}

.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn .ipdf-fill-tool-label,
.ipdf-fill-export-open-btn .ipdf-fill-tool-label {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn:hover:not(:disabled):not(.is-disabled) {
  background: #ffffff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn:hover:not(:disabled):not(.is-disabled) .ipdf-fill-google-icon,
.ipdf-fill-shell .ipdf-fill-tool-btn.ipdf-fill-export-open-btn:hover:not(:disabled):not(.is-disabled) .ipdf-fill-tool-label {
  color: #2563eb;
}

.ipdf-fill-export-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1810;
  display: flex;
  width: 480px;
  max-width: min(480px, 100vw);
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: hidden;
  border-radius: 16px 0 0 16px;
  background: #fff;
  box-shadow: -20px 0 60px rgba(15, 23, 42, .18);
  color: #0f172a;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(.22, 1, .36, 1);
}

.ipdf-fill-export-drawer.is-open {
  transform: translateX(0);
}

.ipdf-fill-export-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.ipdf-fill-export-drawer__header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.ipdf-fill-export-drawer__header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.ipdf-fill-export-drawer__close {
  flex: 0 0 auto;
}

.ipdf-fill-export-drawer__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 24px 24px;
}

.ipdf-fill-export-section__title {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ipdf-fill-export-quick-actions {
  display: grid;
  gap: 10px;
}

.ipdf-fill-export-quick-action {
  display: flex;
  width: 100%;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  border: 1px solid #d7e0eb;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  padding: 13px;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.ipdf-fill-export-quick-action[hidden] {
  display: none;
}

.ipdf-fill-export-quick-action:hover:not(:disabled) {
  border-color: #bfdbfe;
  background: #fff;
}

.ipdf-fill-export-quick-action > .ipdf-fill-google-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #dbeafe;
  color: #2563eb;
  font-size: 21px;
}

.ipdf-fill-export-quick-action span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ipdf-fill-export-quick-action strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.1;
}

.ipdf-fill-export-quick-action small {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
}

.ipdf-fill-export-quick-action:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.ipdf-fill-export-file {
  margin-top: 0;
}

.ipdf-fill-export-filename-card {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  border: 1px solid #d7e0eb;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  padding: 12px;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.ipdf-fill-export-filename-card.is-editing,
.ipdf-fill-export-filename-card:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
  background: #fff;
}

.ipdf-fill-export-filename-card__icon,
.ipdf-fill-export-filename-card__edit {
  display: inline-flex;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.ipdf-fill-export-filename-card__icon {
  background: #dbeafe;
  color: #2563eb;
}

.ipdf-fill-export-filename-card__input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
  outline: none;
  padding: 0;
  text-overflow: ellipsis;
}

.ipdf-fill-export-filename-card__input[readonly] {
  cursor: default;
}

.ipdf-fill-export-filename-card__edit {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.ipdf-fill-export-filename-card__edit:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #2563eb;
}

.ipdf-fill-export-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.ipdf-fill-export-format-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.ipdf-fill-export-format {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  border: 1px solid #d7e0eb;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  padding: 12px;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 80ms ease;
}

.ipdf-fill-export-format:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.ipdf-fill-export-format:active:not(:disabled) {
  transform: translateY(1px);
}

.ipdf-fill-export-format.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.ipdf-fill-export-format.is-disabled,
.ipdf-fill-export-format:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.ipdf-fill-export-format__badge {
  display: inline-flex;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
}

.ipdf-fill-export-format__badge--pdf {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.ipdf-fill-export-format__badge--docx {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.ipdf-fill-export-format__badge--pptx {
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.ipdf-fill-export-format__badge--png {
  background: linear-gradient(135deg, #14b8a6, #059669);
}

.ipdf-fill-export-format__badge--jpg {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.ipdf-fill-export-format__badge--tiff {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

.ipdf-fill-export-format__badge--txt {
  background: linear-gradient(135deg, #64748b, #334155);
}

.ipdf-fill-export-format__badge--zip {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.ipdf-fill-export-format__badge--default {
  background: #334155;
}

.ipdf-fill-export-format__check {
  display: inline-flex;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: transparent;
  margin-left: auto;
}

.ipdf-fill-export-format.is-selected .ipdf-fill-export-format__check {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.ipdf-fill-export-format__check .ipdf-fill-google-icon {
  font-size: 17px;
  line-height: 1;
}

.ipdf-fill-export-format__main {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
}

.ipdf-fill-export-format__title {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.ipdf-fill-export-format__description {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.ipdf-fill-export-format__extension {
  display: block;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.ipdf-fill-export-format.is-selected .ipdf-fill-export-format__extension {
  color: #1d4ed8;
}

.ipdf-fill-export-drawer__status {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.ipdf-fill-export-drawer__footer {
  display: grid;
  flex: 0 0 auto;
  gap: 12px;
  padding: 18px 24px 22px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 -8px 22px rgba(15, 23, 42, .04);
}

.ipdf-fill-export-action {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  padding: 0 16px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 80ms ease;
}

.ipdf-fill-export-action .ipdf-fill-google-icon {
  font-size: 20px;
}

.ipdf-fill-export-action--secondary {
  order: 2;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.ipdf-fill-export-action--secondary:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
}

.ipdf-fill-export-action--primary {
  order: 1;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
}

.ipdf-fill-export-action--primary:hover:not(:disabled) {
  border-color: #1d4ed8;
  background: #1d4ed8;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .24);
}

.ipdf-fill-export-action:active:not(:disabled) {
  transform: translateY(1px);
}

.ipdf-fill-export-action:disabled {
  cursor: not-allowed;
  opacity: .55;
  box-shadow: none;
}

.ipdf-fill-export-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1840;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  box-shadow: 0 14px 35px rgba(15, 23, 42, .16);
  color: #b91c1c;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  padding: 12px 14px;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.ipdf-fill-export-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ipdf-fill-export-print-frame {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.ipdf-fill-export-rendering .ipdf-fill-text-zone-layer,
.ipdf-fill-export-rendering .ipdf-fill-resize-handle,
.ipdf-fill-export-rendering .ipdf-fill-shape-vertex-handle,
.ipdf-fill-export-rendering .ipdf-fill-shape-snap-ball,
.ipdf-fill-export-rendering .ipdf-fill-overlay-action,
.ipdf-fill-export-rendering .ipdf-fill-detected-font-warning {
  display: none !important;
}

.ipdf-fill-export-rendering .ipdf-fill-overlay-object,
.ipdf-fill-export-rendering .ipdf-fill-overlay-object.is-selected,
.ipdf-fill-export-rendering [data-ipdf-fill-overlay-id],
.ipdf-fill-export-rendering [data-ipdf-fill-overlay-id].is-selected {
  outline: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  .ipdf-fill-export-drawer {
    top: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    border-radius: 0;
    box-shadow: 0 -18px 48px rgba(15, 23, 42, .2);
    transform: translateY(100%);
  }

  .ipdf-fill-export-drawer.is-open {
    transform: translateY(0);
  }

  .ipdf-fill-export-drawer__header {
    padding: 18px 18px 14px;
  }

  .ipdf-fill-export-drawer__body {
    gap: 20px;
    padding: 16px 18px 18px;
  }

  .ipdf-fill-export-drawer__footer {
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  }

  .ipdf-fill-export-open-btn {
    min-width: 160px;
  }

  .ipdf-fill-export-format {
    min-height: 68px;
  }

  .ipdf-fill-export-format__badge {
    width: 48px;
    height: 48px;
  }
}
