/* ============================================================
   TRADESALA TOOLSPOT — COMPRESS PDF SPECIFIC STYLES
   ============================================================ */

.tool-header {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

.tool-layout {
  display: flex;
  justify-content: center;
  margin: 0 auto !important;
  max-width: 900px;
  width: 100%;
}

.p2w-panel {
  width: 100%;
  padding: 40px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

/* ── WORKBENCH CONTAINER (Grid Stack) ── */
.workbench-container {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  position: relative;
}

.p2w-dropzone, .loading-view, .compress-options, .success-panel {
  grid-area: 1 / 1 / 2 / 2;
  transition: opacity 0.3s ease;
  width: 100%;
  opacity: 0;
  display: none;
  will-change: opacity;
}

.view-active {
  display: block !important;
  opacity: 1 !important;
  z-index: 2;
}

.is-leaving {
  display: block !important;
  opacity: 0 !important;
  z-index: 1;
  position: absolute;
  pointer-events: none;
}

/* ── DROPZONE ── */
.p2w-dropzone {
  width: 100% !important;
  box-sizing: border-box;
  border: 2px dashed var(--glass-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  padding: 60px 20px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.p2w-dropzone:hover,
.p2w-dropzone.drag-over {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--red);
  transform: translateY(-2px);
}

.p2w-dropzone.drag-over::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(249, 115, 22, 0.05);
  pointer-events: none;
}

.drop-icon {
  font-size: 64px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(249, 115, 22, 0.2));
  transition: transform 0.3s ease;
}

.p2w-dropzone h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.p2w-dropzone p {
  color: var(--text-3);
  margin-bottom: 30px;
}

/* ── GLASS BUTTONS ── */
.rb-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text) !important;
  padding: 14px 36px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.rb-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.rb-btn-primary {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
  color: var(--red) !important;
}

.rb-btn-primary:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: var(--red) !important;
}

/* ── PRIVACY BADGE ── */
.privacy-badge {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-3);
  background: rgba(255,255,255,0.03);
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  display: inline-block;
}

/* ── ELITE LOADER ── */
.loading-view {
  padding: 80px 20px;
  text-align: center;
}

.loader-percentage {
  font-family: 'Outfit', sans-serif;
  font-size: 56px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -2px;
}

.elite-progress-container {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  margin: 30px auto;
}

.elite-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), #f97316);
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
  width: 0%;
  transition: width 0.3s ease;
}

/* ── COMPRESSION OPTIONS ── */
.compress-options {
  padding: 20px 0;
}

/* ── MODE SWITCHER (3-Way Toggle) ── */
.mode-switcher-wrap {
  display: flex;
  justify-content: center;
}

.mode-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: 12px;
  position: relative;
  border: 1px solid var(--glass-border);
}

.mode-indicator {
  position: absolute;
  height: calc(100% - 8px);
  width: calc(33.333% - 2.66px);
  background: var(--red);
  border-radius: 8px;
  top: 4px;
  left: 4px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.mode-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  font-family: 'Outfit', sans-serif;
}

.mode-btn.active {
  color: #fff;
}

.mode-descriptions {
  text-align: center;
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mode-desc-item {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.mode-desc-item strong {
  color: var(--text);
  font-weight: 700;
}

/* ── SAVINGS METER (GLASSMORPHIC) ── */
.savings-meter-wrap {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 30px;
  margin: 30px auto;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.savings-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.stat-item.highlight .stat-val {
  color: #10b981; /* Green for new size */
}

.stat-item.save .stat-val {
  color: var(--red); /* Red for savings percentage */
}

.privacy-badge {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: inline-block;
}

/* ── EDITOR HEADER & FOOTER CONTROLS ── */
.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--glass-border);
}

.file-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.file-name {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.file-meta {
  font-size: 13px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 6px;
}

.editor-footer-controls {
  margin-top: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
}

.summary-inline {
  font-size: 14px;
  color: var(--text-2);
}

.summary-inline .hl {
  color: var(--red);
  font-weight: 800;
}

.footer-right {
  display: flex;
  align-items: center;
}

@media (max-width: 600px) {
  .editor-footer-controls {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    text-align: center;
  }
}

/* ── SUCCESS PANEL ── */
.success-panel {
  text-align: center;
  padding: 40px 0;
}

.success-icon {
  font-size: 64px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 30px rgba(249,115,22,0.3));
}

.success-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.success-content p {
  color: var(--text-2);
  margin-bottom: 30px;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}
