/* Extra document handling fee modal + price line (copy products) */

.ccf-extra-document-fee-line {
  margin-top: 0.35rem;
}

.ccf-extra-document-fee-line[hidden] {
  display: none !important;
}

.ccf-extra-doc-fee-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}

.ccf-extra-doc-fee-modal.is-open {
  display: flex;
  animation: ccfExtraDocFeeFade 0.18s ease-out;
}

@keyframes ccfExtraDocFeeFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ccf-extra-doc-fee-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: none;
  overflow: visible;
  padding: 18px 18px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.8) inset;
  animation: ccfExtraDocFeePop 0.2s ease-out;
}

@keyframes ccfExtraDocFeePop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ccf-extra-doc-fee-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ccf-extra-doc-fee-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ccf-extra-doc-fee-header {
  margin: 0 34px 8px 0;
}

.ccf-extra-doc-fee-kicker {
  margin: 0 0 2px;
  color: #558bca;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ccf-extra-doc-fee-dialog h3 {
  margin: 0;
  color: #172b46;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ccf-extra-doc-fee-content {
  margin: 0 0 10px;
}

.ccf-extra-doc-fee-copy {
  margin: 0 0 10px;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.4;
}

.ccf-extra-doc-fee-copy strong {
  color: #1e293b;
  font-weight: 700;
}

/* Horizontal math strip */
.ccf-extra-doc-fee-math {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 4px;
  margin: 0;
  padding: 8px 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dbe4f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ccf-extra-doc-fee-math-cell {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 4px;
  border-radius: 9px;
  text-align: center;
}

.ccf-extra-doc-fee-math-op {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0 1px;
}

.ccf-extra-doc-fee-math-label {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
}

.ccf-extra-doc-fee-math-value {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.ccf-extra-doc-fee-math-free {
  background: #f0fdf4;
}

.ccf-extra-doc-fee-math-free .ccf-extra-doc-fee-math-value {
  color: #15803d;
}

.ccf-extra-doc-fee-math-total {
  background: linear-gradient(135deg, #eff6ff 0%, #e0efff 100%);
  border: 1px solid #bfdbfe;
}

.ccf-extra-doc-fee-math-total .ccf-extra-doc-fee-math-label {
  color: #1e3a5f;
}

.ccf-extra-doc-fee-math-total .ccf-extra-doc-fee-math-value {
  color: #1d4ed8;
  font-size: 1.12rem;
  font-weight: 900;
}

.ccf-extra-doc-fee-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.ccf-extra-doc-fee-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.ccf-extra-doc-fee-btn:active {
  transform: translateY(1px);
}

.ccf-extra-doc-fee-btn-label {
  display: block;
  line-height: 1.2;
}

.ccf-extra-doc-fee-btn-hint {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.9;
}

.ccf-extra-doc-fee-btn-primary {
  border-color: #3f78b5;
  background: linear-gradient(165deg, #7eb6ea 0%, #558bca 42%, #3f78b5 100%);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 8px 20px rgba(85, 139, 202, 0.45),
    0 0 22px rgba(85, 139, 202, 0.35);
}

.ccf-extra-doc-fee-btn-primary:hover {
  background: linear-gradient(165deg, #8fc0ef 0%, #5f95d0 42%, #4a7db8 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 10px 24px rgba(85, 139, 202, 0.55),
    0 0 28px rgba(85, 139, 202, 0.45);
}

.ccf-extra-doc-fee-btn-primary .ccf-extra-doc-fee-btn-hint {
  color: rgba(255, 255, 255, 0.92);
}

.ccf-extra-doc-fee-btn-secondary {
  border-color: #93c5fd;
  background: #fff;
  color: #1e3a5f;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.ccf-extra-doc-fee-btn-secondary:hover {
  background: #f8fbff;
  border-color: #558bca;
  box-shadow: 0 4px 12px rgba(85, 139, 202, 0.16);
}

.ccf-extra-doc-fee-btn-secondary .ccf-extra-doc-fee-btn-hint {
  color: #64748b;
}

.ccf-extra-doc-fee-btn-ghost {
  grid-column: 1 / -1;
  min-height: 32px;
  padding: 4px 10px;
  border-color: transparent;
  background: transparent;
  color: #64748b;
  font-weight: 700;
  font-size: 0.84rem;
  box-shadow: none;
}

.ccf-extra-doc-fee-btn-ghost:hover {
  background: #f1f5f9;
  color: #334155;
}

@media (max-width: 560px) {
  .ccf-extra-doc-fee-modal {
    align-items: flex-end;
    padding: 0;
  }

  .ccf-extra-doc-fee-dialog {
    width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 16px 14px 12px;
  }

  .ccf-extra-doc-fee-math {
    gap: 2px;
    padding: 6px 4px;
  }

  .ccf-extra-doc-fee-math-cell {
    padding: 5px 2px;
  }

  .ccf-extra-doc-fee-math-value {
    font-size: 0.92rem;
  }

  .ccf-extra-doc-fee-math-total .ccf-extra-doc-fee-math-value {
    font-size: 0.98rem;
  }

  .ccf-extra-doc-fee-math-label {
    font-size: 0.62rem;
  }

  .ccf-extra-doc-fee-math-op {
    font-size: 0.8rem;
  }

  .ccf-extra-doc-fee-actions {
    grid-template-columns: 1fr;
  }

  .ccf-extra-doc-fee-btn {
    min-height: 42px;
  }
}
