/* Learnova PDF Tools — Document Workspace identity */

:root {
  --pdf-navy: #071c33;
  --pdf-navy-2: #0d2c4d;
  --pdf-red: #e53935;
  --pdf-red-2: #bd2825;
  --pdf-orange: #f59e0b;

  --pdf-paper: #fffdf9;
  --pdf-bg: #f3f6fa;
  --pdf-surface: #ffffff;

  --pdf-text: #102238;
  --pdf-muted: #5c6c7e;
  --pdf-border: #d7e0ea;

  --pdf-success: #14804a;
  --pdf-warning: #a85f00;
  --pdf-danger: #b42318;
  --pdf-focus: #2563eb;

  --pdf-shadow: 0 18px 50px rgba(7, 28, 51, 0.12);
  --pdf-radius: 18px;
  --pdf-max: 1180px;
  --pdf-work: 900px;

  /* Keep PDF Tools consistent with the light Learnova site */
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

.pdf-scope {
  margin: 0;
  background:
    radial-gradient(
      circle at 88% 4%,
      rgba(229, 57, 53, 0.10),
      transparent 30rem
    ),
    radial-gradient(
      circle at 8% 26%,
      rgba(245, 158, 11, 0.08),
      transparent 28rem
    ),
    var(--pdf-bg);

  color: var(--pdf-text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.55;
}

.pdf-scope a {
  color: inherit;
}

/* Header */

.pdf-header {
  background: linear-gradient(
    120deg,
    var(--pdf-navy),
    #123d68
  );
  color: white;
  border-bottom: 3px solid var(--pdf-red);
}

.pdf-header__inner,
.pdf-main,
.pdf-footer__inner {
  max-width: var(--pdf-max);
  margin: auto;
  padding: 18px 22px;
}

.pdf-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.pdf-logo {
  width: 38px;
  height: 44px;
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(145deg, #fff, #e9eef5);
  color: var(--pdf-red);
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: inset 0 -6px 0 rgba(229, 57, 53, 0.08);
}

.pdf-brand small {
  display: block;
  font-weight: 500;
  opacity: 0.78;
}

.pdf-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.pdf-nav__links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pdf-nav__links a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #eaf3fc;
}

.pdf-nav__links a:hover,
.pdf-nav__links a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

/* Hero */

.pdf-hero {
  padding: 54px 0 30px;
}

.pdf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 57, 53, 0.10);
  color: var(--pdf-red);
  font-weight: 800;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.pdf-hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
  margin: 0.6rem 0 1rem;
  letter-spacing: -0.04em;
}

.pdf-hero p {
  max-width: 760px;
  color: var(--pdf-muted);
  font-size: 1.08rem;
}

/* Privacy */

.pdf-privacy-strip {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.pdf-privacy-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--pdf-border);
  border-radius: 999px;
  background: var(--pdf-surface);
  font-size: 0.9rem;
}

/* Tool grid */

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 16px;
}

.pdf-card {
  background: var(--pdf-surface);
  border: 1px solid var(--pdf-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 30px rgba(7, 28, 51, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.pdf-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--pdf-red);
}

.pdf-card h3 {
  margin: 0.2rem 0 0.4rem;
}

.pdf-card p {
  margin: 0 0 1rem;
  color: var(--pdf-muted);
}

.pdf-card a {
  margin-top: auto;
  text-decoration: none;
  font-weight: 800;
  color: var(--pdf-red);
}

.pdf-card__status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--pdf-success);
}

.pdf-card__status--gated {
  color: var(--pdf-warning);
}

/* Sections */

.pdf-section {
  padding: 24px 0 34px;
}

.pdf-section h2 {
  font-size: 1.55rem;
  margin: 0 0 14px;
}

/* Search */

.pdf-search {
  position: sticky;
  top: 10px;
  z-index: 4;
  background: color-mix(
    in srgb,
    var(--pdf-bg) 90%,
    transparent
  );
  backdrop-filter: blur(12px);
  padding: 12px 0;
}

.pdf-search input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--pdf-border);
  background: var(--pdf-surface);
  color: var(--pdf-text);
  border-radius: 14px;
  font: inherit;
  box-shadow: 0 8px 24px rgba(7, 28, 51, 0.05);
}

.pdf-search input:focus {
  outline: 3px solid color-mix(
    in srgb,
    var(--pdf-focus) 28%,
    transparent
  );
  border-color: var(--pdf-focus);
}

/* Breadcrumb */

.pdf-breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--pdf-muted);
  padding-top: 22px;
}

.pdf-breadcrumb a {
  color: var(--pdf-muted);
}

/* Tool layout */

.pdf-tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

/* Workspace */

.pdf-workspace {
  background: var(--pdf-surface);
  border: 1px solid var(--pdf-border);
  border-radius: var(--pdf-radius);
  box-shadow: var(--pdf-shadow);
  overflow: hidden;
}

.pdf-workspace__bar {
  background: linear-gradient(
    90deg,
    var(--pdf-navy),
    var(--pdf-navy-2)
  );
  color: white;
  padding: 13px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.pdf-workspace__body {
  padding: 20px;
}

/* Dropzone */

.pdf-dropzone {
  border: 2px dashed #9aacbf;
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  background: linear-gradient(
    180deg,
    color-mix(
      in srgb,
      var(--pdf-paper) 88%,
      transparent
    ),
    var(--pdf-surface)
  );
  transition: 0.18s;
}

.pdf-dropzone.is-drag {
  border-color: var(--pdf-red);
  background: color-mix(
    in srgb,
    var(--pdf-red) 7%,
    var(--pdf-surface)
  );
}

.pdf-dropzone input {
  max-width: 100%;
}

.pdf-dropzone strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

/* Files */

.pdf-files {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.pdf-file {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--pdf-border);
  border-radius: 12px;
  padding: 9px 11px;
  background: var(--pdf-paper);
}

.pdf-file__icon {
  width: 34px;
  height: 40px;
  border-radius: 6px;
  background: var(--pdf-red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 900;
}

.pdf-file small {
  color: var(--pdf-muted);
}

/* Controls */

.pdf-controls {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.pdf-field {
  display: grid;
  gap: 6px;
}

.pdf-field label {
  font-weight: 750;
}

.pdf-field input,
.pdf-field textarea,
.pdf-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--pdf-border);
  border-radius: 10px;
  background: var(--pdf-surface);
  color: var(--pdf-text);
  font: inherit;
}

.pdf-field textarea {
  min-height: 130px;
  resize: vertical;
}

.pdf-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

/* Actions */

.pdf-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pdf-btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pdf-btn--primary {
  background: var(--pdf-red);
  color: #fff;
}

.pdf-btn--primary:hover {
  background: var(--pdf-red-2);
}

.pdf-btn--secondary {
  background: var(--pdf-surface);
  border-color: var(--pdf-border);
  color: var(--pdf-text);
}

.pdf-btn:focus-visible {
  outline: 3px solid color-mix(
    in srgb,
    var(--pdf-focus) 35%,
    transparent
  );
  outline-offset: 2px;
}

.pdf-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Progress */

.pdf-progress {
  height: 8px;
  background: var(--pdf-border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 14px;
}

.pdf-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--pdf-red),
    var(--pdf-orange)
  );
  transition: width 0.2s;
}

/* Status */

.pdf-status {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 10px;
  background: color-mix(
    in srgb,
    var(--pdf-navy) 7%,
    var(--pdf-surface)
  );
  color: var(--pdf-muted);
}

.pdf-status[data-kind="error"] {
  background: color-mix(
    in srgb,
    var(--pdf-danger) 10%,
    var(--pdf-surface)
  );
  color: var(--pdf-danger);
}

.pdf-status[data-kind="success"] {
  background: color-mix(
    in srgb,
    var(--pdf-success) 10%,
    var(--pdf-surface)
  );
  color: var(--pdf-success);
}

/* Results */

.pdf-result {
  margin-top: 16px;
  border-top: 1px solid var(--pdf-border);
  padding-top: 16px;
}

.pdf-downloads {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Sidebar */

.pdf-side {
  display: grid;
  gap: 14px;
}

.pdf-note {
  padding: 16px;
  border: 1px solid var(--pdf-border);
  border-radius: 14px;
  background: var(--pdf-surface);
}

.pdf-note h3 {
  font-size: 1rem;
  margin: 0 0 7px;
}

.pdf-note p,
.pdf-note li {
  font-size: 0.9rem;
  color: var(--pdf-muted);
}

.pdf-note ul {
  padding-left: 20px;
  margin: 0.4rem 0;
}

/* Gate */

.pdf-gate {
  border-left: 4px solid var(--pdf-orange);
  background: color-mix(
    in srgb,
    var(--pdf-orange) 8%,
    var(--pdf-surface)
  );
  padding: 16px;
  border-radius: 12px;
}

/* Footer */

.pdf-footer {
  margin-top: 50px;
  background: var(--pdf-navy);
  color: #d6e3f0;
}

.pdf-footer a {
  color: #fff;
}

.pdf-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

/* Advertising placeholder */

.pdf-ad-slot {
  min-height: 90px;
  border: 1px dashed var(--pdf-border);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--pdf-muted);
  font-size: 0.8rem;
  margin: 20px 0;
}

/* Screen reader */

.pdf-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tables */

.pdf-table {
  width: 100%;
  border-collapse: collapse;
}

.pdf-table th,
.pdf-table td {
  padding: 10px;
  border-bottom: 1px solid var(--pdf-border);
  text-align: left;
}

/* Canvas */

.pdf-canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--pdf-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

/* Continue section */

.pdf-continue {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--pdf-border);
  border-radius: 14px;
  background: var(--pdf-surface);
}

.pdf-continue h3 {
  margin: 0 0 6px;
  color: var(--pdf-navy);
}

.pdf-continue p {
  margin: 0 0 12px;
  color: var(--pdf-muted);
  font-size: 0.94rem;
}

/* Responsive */

@media (max-width: 820px) {
  .pdf-tool-layout {
    grid-template-columns: 1fr;
  }

  .pdf-side {
    grid-template-columns:
      repeat(auto-fit, minmax(220px, 1fr));
  }

  .pdf-nav__links {
    display: none;
  }

  .pdf-header__inner {
    padding: 14px 16px;
  }

  .pdf-main {
    padding: 0 16px;
  }

  .pdf-hero {
    padding-top: 38px;
  }

  .pdf-workspace__body {
    padding: 15px;
  }

  .pdf-dropzone {
    padding: 24px 12px;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
