/* PDF Compress Tool Styles */

/* ===== COMPRESSION MODE CARDS ===== */
.compress-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  position: relative;
}

.mode-card:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, .04);
}

.mode-card.selected {
  border-color: var(--primary);
  background: rgba(37, 99, 235, .08);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.mode-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mode-icon {
  color: var(--text-dim);
  transition: color .2s;
}

.mode-card.selected .mode-icon {
  color: var(--primary);
}

.mode-label {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}

.mode-desc {
  font-size: .78rem;
  color: var(--text-dim);
  line-height: 1.3;
}

/* ===== RESULT CARDS ===== */
.compress-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.result-header {
  margin-bottom: 10px;
  font-size: .95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-sizes {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .88rem;
  margin-bottom: 12px;
}

.result-sizes .savings-badge {
  margin-left: auto;
}

/* ===== SIZE COMPARISON BAR ===== */
.result-bar {
  position: relative;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.result-bar-original {
  position: absolute;
  inset: 0;
  background: rgba(239, 68, 68, .15);
  border: 1px solid rgba(239, 68, 68, .25);
  border-radius: 4px;
}

.result-bar-compressed {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(34, 197, 94, .25);
  border: 1px solid rgba(34, 197, 94, .4);
  border-radius: 4px;
  transition: width .5s ease;
  min-width: 4px;
}

/* ===== FILE LIST ADJUSTMENTS ===== */
#pc-file-list .file-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

#pc-file-list .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#pc-file-list .file-size {
  color: var(--text-dim);
  font-size: .78rem;
  flex-shrink: 0;
}

/* ===== PULSING PROGRESS ===== */
@keyframes pdfPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
#pc-progress-wrap .progress-fill {
  animation: pdfPulse 1.5s ease-in-out infinite;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .compress-modes {
    grid-template-columns: 1fr;
  }

  .mode-card {
    flex-direction: row;
    text-align: left;
    gap: 12px;
    padding: 12px 14px;
  }

  .mode-icon {
    flex-shrink: 0;
  }

  .mode-card .mode-info {
    flex: 1;
  }

  .result-sizes {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .result-sizes .savings-badge {
    margin-left: 0;
  }
}
