/* =========================================================
   Premium PDF Compressor - Stylesheet
   ========================================================= */

:root {
  --bg: #fafafa;
  --card-bg: #ffffff;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-light: #eff6ff;
  --success: #16a34a;
  --success-dark: #15803d;
  --danger: #dc2626;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-light: #eef0f3;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 16px 50px rgba(0, 0, 0, 0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(37, 99, 235, 0.05) 0%, transparent 45%);
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.app-wrapper {
  width: 100%;
  max-width: 640px;
}

/* ---------------- Glass Card ---------------- */
.glass-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 44px;
  position: relative;
  overflow: hidden;
  animation: fadeScaleIn 0.5s ease;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------------- Header ---------------- */
.app-icon {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
  color: #fff;
}

.app-icon svg {
  width: 38px;
  height: 38px;
}

.app-title {
  text-align: center;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.app-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 34px;
  line-height: 1.5;
}

/* ---------------- Upload Zone ---------------- */
.upload-zone {
  border: 2px dashed #d7dce2;
  border-radius: var(--radius-sm);
  background: #fbfcfd;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
}

.upload-zone .upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--accent);
  opacity: 0.85;
}

.upload-zone .upload-text {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.upload-zone .upload-subtext {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.upload-divider {
  color: #b8bfc9;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 10px 0;
}

.btn-choose {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-choose:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.upload-meta {
  margin-top: 16px;
  font-size: 0.78rem;
  color: #9aa2ad;
}

/* ---------------- File Info Card ---------------- */
.file-info-card {
  background: #f8f9fb;
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  animation: fadeScaleIn 0.35s ease;
}

.file-info-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.file-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-info-icon svg {
  width: 24px;
  height: 24px;
}

.upload-progress-track {
  width: 100%;
  height: 6px;
  background: #e6e9ee;
  border-radius: 100px;
  overflow: hidden;
  margin-top: 14px;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 100px;
  transition: width 0.2s ease;
}

.file-info-details {
  flex: 1;
  min-width: 0;
}

.file-info-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-info-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.file-remove-btn {
  background: none;
  border: none;
  color: #9aa2ad;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition);
  flex-shrink: 0;
}

.file-remove-btn:hover {
  background: #fee2e2;
  color: var(--danger);
}

/* ---------------- Target Size ---------------- */
.target-size-group {
  margin-top: 26px;
}

.target-size-label {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
  display: block;
}

.target-size-input-wrap {
  position: relative;
}

.target-size-input {
  width: 100%;
  padding: 16px 128px 16px 18px;
  border-radius: var(--radius-sm);
  border: 2px solid #e6e9ee;
  font-size: 1.15rem;
  font-weight: 600;
  transition: var(--transition);
  background: #fbfcfd;
}

.target-size-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.target-size-unit-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  background: #eef0f3;
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}

.unit-option {
  border: none;
  background: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.unit-option:hover:not(.active) {
  color: var(--text-primary);
}

.unit-option.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.target-size-help {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

/* ---------------- Compress Button ---------------- */
.btn-compress {
  width: 100%;
  margin-top: 28px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  color: #fff;
  border: none;
  padding: 18px;
  border-radius: var(--radius-sm);
  font-size: 1.08rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.btn-compress:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
}

.btn-compress:active:not(:disabled) {
  transform: translateY(0);
}

.btn-compress:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-compress svg {
  width: 20px;
  height: 20px;
}

/* ---------------- Processing Screen ---------------- */
.processing-screen {
  text-align: center;
  padding: 24px 0 8px;
}

.progress-circle-wrap {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto 28px;
}

.progress-circle-wrap svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.progress-circle-bg {
  fill: none;
  stroke: #eef0f3;
  stroke-width: 10;
}

.progress-circle-fg {
  fill: none;
  stroke: url(#gradient-stroke);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}

.progress-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent);
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: #eef0f3;
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 18px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 100px;
  width: 0%;
  transition: width 0.4s ease;
}

.processing-message {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  min-height: 24px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.processing-subtext {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* ---------------- Result Screen ---------------- */
.result-screen {
  animation: fadeScaleIn 0.4s ease;
}

.result-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.result-badge svg {
  width: 32px;
  height: 32px;
}

.result-title {
  text-align: center;
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.result-stat {
  background: #f8f9fb;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.result-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 6px;
}

.result-stat-value {
  font-size: 1.15rem;
  font-weight: 800;
}

.result-stat-value.accent { color: var(--accent); }
.result-stat-value.success { color: var(--success); }

.quality-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: var(--success-dark);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 100px;
}

/* ---------------- Download Section ---------------- */
.download-section {
  border-top: 1px solid var(--border-light);
  margin-top: 24px;
  padding-top: 24px;
}

.download-label {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 8px;
  display: block;
}

.download-filename-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid #e6e9ee;
  font-size: 0.95rem;
  margin-bottom: 16px;
  transition: var(--transition);
  background: #fbfcfd;
}

.download-filename-input:focus {
  outline: none;
  border-color: var(--success);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}

.btn-download {
  width: 100%;
  background: linear-gradient(135deg, var(--success), #22c55e);
  color: #fff;
  border: none;
  padding: 18px;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(22, 163, 74, 0.4);
}

.btn-download svg {
  width: 20px;
  height: 20px;
}

.btn-compress-another {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 14px;
  padding: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-compress-another:hover {
  color: var(--accent);
}

/* ---------------- Toast / Error Popup ---------------- */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  width: min(420px, 90vw);
}

.toast-error {
  background: #fff;
  border-left: 4px solid var(--danger);
  border-radius: 14px;
  box-shadow: var(--shadow-hover);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -16px); }
  to { opacity: 1; transform: translate(0, 0); }
}

.toast-error .toast-icon {
  color: var(--danger);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.toast-error .toast-body {
  flex: 1;
}

.toast-error .toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.toast-error .toast-message {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.toast-close {
  background: none;
  border: none;
  color: #9aa2ad;
  cursor: pointer;
  padding: 2px;
}

/* ---------------- Screen transitions ---------------- */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ---------------- Footer ---------------- */
.app-footer {
  text-align: center;
  margin-top: 22px;
  color: #b0b6bf;
  font-size: 0.78rem;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 576px) {
  .glass-card {
    padding: 32px 22px;
  }

  .app-title {
    font-size: 1.5rem;
  }

  .upload-zone {
    padding: 34px 16px;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

  .target-size-input {
    padding-right: 112px;
    font-size: 1.05rem;
  }

  .unit-option {
    padding: 6px 10px;
    font-size: 0.74rem;
  }
}

/* ---------------- Accessibility ---------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.upload-zone:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================
   JPG to PDF specific additions
   ========================================================= */

/* ---------------- Image thumbnail grid ---------------- */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.image-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f2f5;
  border: 1px solid var(--border-light);
  animation: fadeScaleIn 0.3s ease;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-thumb .image-thumb-order {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  line-height: 1.4;
}

.image-thumb .image-thumb-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.image-thumb .image-thumb-remove:hover {
  background: var(--danger);
}

.image-thumb .image-thumb-remove svg {
  width: 13px;
  height: 13px;
}

.image-thumb.uploading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-thumb .thumb-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #d7dce2;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.add-more-tile {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 2px dashed #d7dce2;
  background: #fbfcfd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
  transition: var(--transition);
}

.add-more-tile:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.add-more-tile svg {
  width: 26px;
  height: 26px;
}

.image-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.image-summary-bar strong {
  color: var(--text-primary);
}

.btn-clear-all {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-clear-all:hover {
  color: var(--danger);
}

/* ---------------- Page options ---------------- */
.page-options {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.page-options.single-column {
  grid-template-columns: 1fr;
}

.option-field label {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: block;
}

.option-select-wrap {
  position: relative;
}

.option-select {
  width: 100%;
  appearance: none;
  padding: 14px 40px 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid #e6e9ee;
  font-size: 0.95rem;
  font-weight: 600;
  background: #fbfcfd;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
}

.option-select:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.option-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

@media (max-width: 576px) {
  .page-options {
    grid-template-columns: 1fr;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }
}

/* =========================================================
   PDF Joiner & Remover specific additions
   ========================================================= */

/* ---------------- Tab switcher ---------------- */
.tab-switcher {
  display: flex;
  background: #f0f2f5;
  border-radius: 14px;
  padding: 5px;
  gap: 4px;
  margin-bottom: 30px;
}

.tab-btn {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn svg {
  width: 17px;
  height: 17px;
}

.tab-btn.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---------------- Join file grid (list style, with page counts) ---------------- */
.join-file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.join-file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8f9fb;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  animation: fadeScaleIn 0.3s ease;
}

.join-file-order {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.join-file-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.join-file-icon svg {
  width: 20px;
  height: 20px;
}

.join-file-details {
  flex: 1;
  min-width: 0;
}

.join-file-name {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.join-file-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

.join-file-remove {
  background: none;
  border: none;
  color: #9aa2ad;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition);
  flex-shrink: 0;
}

.join-file-remove:hover {
  background: #fee2e2;
  color: var(--danger);
}

.join-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  margin-bottom: 22px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.join-summary-bar strong {
  color: var(--text-primary);
}

/* ---------------- Remove-pages picker grid ---------------- */
.page-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  margin: 18px 0;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px;
}

.page-picker-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f2f5;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.page-picker-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-picker-tile .page-picker-number {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
}

.page-picker-tile:hover {
  border-color: #c7d2e0;
}

.page-picker-tile.marked-remove {
  border-color: var(--danger);
}

.page-picker-tile.marked-remove::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(220, 38, 38, 0.45);
}

.page-picker-tile .page-picker-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.page-picker-tile.marked-remove .page-picker-check {
  background: var(--danger);
  color: #fff;
}

.page-picker-tile .page-picker-check svg {
  width: 12px;
  height: 12px;
  opacity: 0;
}

.page-picker-tile.marked-remove .page-picker-check svg {
  opacity: 1;
}

.picker-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.picker-summary-bar strong {
  color: var(--danger);
}

.picker-summary-bar strong.zero {
  color: var(--text-secondary);
}

@media (max-width: 576px) {
  .page-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }

  .tab-btn {
    font-size: 0.82rem;
    padding: 10px 10px;
  }
}
