/* HeyMyPDF Modern PDF Compression Studio */
.compression-studio {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  font-family: inherit;
}

.compression-drop {
  margin: 10px 0 18px;
  padding: 28px 20px;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.compression-drop:hover,
.compression-drop.dragover {
  background: #f0fdf4;
  border-color: #00aa6c;
}

.compression-drop:focus-visible {
  outline: 3px solid #00aa6c;
  outline-offset: 3px;
}

.compression-drop .drop-icon {
  margin: 0 auto 10px;
  font-size: 26px;
  color: #00aa6c;
}

.compression-drop strong {
  font-size: 18px;
  display: block;
  color: #0f172a;
}

.compression-drop span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-top: 6px;
}

/* File Selected Pill Badge (Matching Screenshot 2) */
.compress-selected-card {
  margin: 12px 0 20px;
}

.compress-selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fef9c3;
  border: 1px solid #fde047;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: #854d0e;
}

.selected-tag {
  font-style: italic;
  font-weight: 500;
}

.compress-selected-badge strong {
  font-weight: 600;
  color: #713f12;
}

.selected-size {
  color: #a16207;
  font-size: 12px;
}

/* Settings Form (Matching Screenshot 2) */
.compress-settings-box {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 20px 0;
}

.compress-form-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.compress-form-label {
  min-width: 175px;
  font-weight: 700;
  font-size: 14.5px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.compress-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  user-select: none;
  transition: all 0.15s;
}

.compress-tooltip-icon:hover {
  background: #cbd5e1;
  color: #334155;
}

/* Segmented Pill Group (Matching Screenshot 2 Teal Selected Styling) */
.compress-segmented-group {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.compress-segmented-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  margin: 0;
}

.compress-segmented-item:last-child {
  border-right: none;
}

.compress-segmented-item:hover {
  background: #f8fafc;
}

.compress-segmented-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

/* Active Selected Pill: Teal background with dark teal text & border (Screenshot 2) */
.compress-segmented-item.active,
.compress-segmented-item:has(input:checked) {
  background: #def7ec !important;
  color: #03543f !important;
  font-weight: 700 !important;
  outline: 1.5px solid #31c48d;
  z-index: 2;
}

.compress-segmented-item.active .compress-tooltip-icon,
.compress-segmented-item:has(input:checked) .compress-tooltip-icon {
  background: #bcf0da;
  color: #03543f;
}

/* Consent Notice */
.compression-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
  margin: 18px 0 14px;
}

.compression-consent input {
  margin-top: 3px;
  accent-color: #00aa6c;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.compression-consent.has-error {
  background: #fff5f5;
  border-color: #ef4444;
}

.compression-consent-warning:not([hidden]) {
  display: block;
  margin: 8px 0 14px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 14px;
  font-weight: 600;
}

/* Action Bar with Emerald Green Button (Screenshot 2) */
.compress-action-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0 10px;
}

.compress-submit-button {
  background: #00aa6c;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  padding: 13px 32px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 170, 108, 0.25);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.compress-submit-button:hover:not(:disabled) {
  background: #008f5a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 170, 108, 0.35);
}

.compress-submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Progress Section */
.compress-progress-container {
  border-top: 1px solid #e2e8f0;
  margin-top: 22px;
  padding-top: 20px;
}

.compress-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.compress-progress-header h3 {
  font-weight: 700;
  color: #0f172a;
  font-size: 15px;
  margin: 0;
}

.compress-position {
  font-size: 13px;
  color: #00aa6c;
  font-weight: 600;
}

.compress-progress-bar-wrap progress {
  width: 100%;
  height: 12px;
  accent-color: #2563eb;
  border-radius: 10px;
  overflow: hidden;
  border: none;
}

.compress-progress-bar-wrap progress::-webkit-progress-bar {
  background-color: #e2e8f0;
  border-radius: 10px;
}

.compress-progress-bar-wrap progress::-webkit-progress-value {
  background-color: #2563eb;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.compress-message {
  font-size: 13.5px;
  color: #64748b;
  margin-top: 8px;
  line-height: 1.5;
}

.compress-message.error {
  color: #dc2626;
  font-weight: 600;
}

/* Result Card Matching Screenshot 1 (Light Blue Card, Download Button) */
.compress-result-box {
  background: #f0f6ff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 24px 28px;
  margin-top: 22px;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.05);
}

.compress-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.compress-result-head h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0;
}

.compress-target-tag {
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
}

.compress-result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-col .stat-label {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}

.stat-col .stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.stat-col .stat-saved {
  color: #16a34a;
}

.compress-download-button {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 26px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.compress-download-button:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.compress-download-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Privacy & Ad Rail */
.ad-neighbor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 26px;
  align-items: start;
}

.ad-rail {
  padding: 18px;
  background: #f8fafc;
  border-radius: 18px;
  min-height: 340px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.ad-rail span {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.05em;
}

@media (max-width: 820px) {
  .ad-neighbor {
    grid-template-columns: 1fr;
  }
  .ad-rail {
    min-height: 100px;
  }
  .compress-form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .compress-form-label {
    min-width: auto;
  }
  .compress-result-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
