/* Merge PDF page hero */
.merge-pdf-page .tool-layout-container {
  max-width: 1180px;
  margin-top: clamp(118px, 14vw, 156px);
  padding-top: 0;
}

.merge-pdf-page .tool-section {
  gap: 24px;
  padding: 0;
}

.merge-pdf-page .tool-header {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(108, 140, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.light-mode.merge-pdf-page .tool-header {
  background:
    radial-gradient(circle at top left, rgba(108, 140, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82));
  border-color: rgba(58, 90, 254, 0.12);
  box-shadow: 0 20px 50px rgba(58, 90, 254, 0.08);
}

.merge-pdf-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(58, 90, 254, 0.14);
  border: 1px solid rgba(108, 140, 255, 0.28);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.merge-pdf-page .tool-title {
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  margin-bottom: 0.85rem;
}

.merge-pdf-page .tool-description {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 1.08rem;
}

.merge-pdf-trust-section {
  margin-top: 1.5rem;
}

.merge-pdf-trust-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.merge-pdf-trust-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 76px;
  padding: 1.1rem 1.2rem;
  text-align: left;
  border-radius: 18px;
  background: rgba(11, 17, 45, 0.62);
  border: 1px solid rgba(92, 122, 255, 0.18);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.14);
}

.merge-pdf-trust-item i {
  color: var(--primary-light);
  font-size: 1.2rem;
}

.light-mode.merge-pdf-page .merge-pdf-trust-item {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(58, 90, 254, 0.14);
  box-shadow: 0 14px 28px rgba(58, 90, 254, 0.08);
}

.merge-pdf-use-cases-wrapper {
  max-width: 920px;
  margin: 1.9rem auto 0;
  padding: 1.4rem;
  text-align: left;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top right, rgba(108, 140, 255, 0.14), transparent 34%);
  border: 1px solid rgba(92, 122, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.merge-pdf-use-cases-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.merge-pdf-use-cases-kicker {
  margin: 0;
  color: var(--primary-light);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.merge-pdf-use-cases-subtitle {
  margin: 0;
  max-width: 420px;
  color: rgba(241, 245, 249, 0.72);
  font-size: 0.96rem;
  line-height: 1.6;
}

.merge-pdf-use-cases {
  margin: 0;
  padding: 0;
  color: var(--dark-text);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.merge-pdf-use-case-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-height: 148px;
  padding: 1.1rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(19, 27, 63, 0.9), rgba(15, 22, 51, 0.75));
  border: 1px solid rgba(92, 122, 255, 0.14);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.merge-pdf-use-case-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 140, 255, 0.32);
  box-shadow:
    0 24px 40px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(108, 140, 255, 0.08);
}

.merge-pdf-use-case-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(72, 104, 255, 0.92), rgba(100, 162, 255, 0.92));
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 12px 22px rgba(72, 104, 255, 0.32);
}

.merge-pdf-use-case-content {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}

.merge-pdf-use-case-tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(108, 140, 255, 0.12);
  border: 1px solid rgba(108, 140, 255, 0.18);
  color: var(--primary-light);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.merge-pdf-use-case-content p {
  margin: 0;
  color: rgba(241, 245, 249, 0.92);
  font-size: 1rem;
  line-height: 1.7;
}

.light-mode.merge-pdf-page .merge-pdf-use-cases-wrapper {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.84)),
    radial-gradient(circle at top right, rgba(108, 140, 255, 0.1), transparent 34%);
  border-color: rgba(58, 90, 254, 0.12);
}

.light-mode.merge-pdf-page .merge-pdf-use-cases-subtitle {
  color: rgba(30, 41, 59, 0.72);
}

.light-mode.merge-pdf-page .merge-pdf-use-case-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.92));
  border-color: rgba(58, 90, 254, 0.12);
  box-shadow:
    0 18px 30px rgba(58, 90, 254, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.light-mode.merge-pdf-page .merge-pdf-use-case-card:hover {
  border-color: rgba(58, 90, 254, 0.22);
}

.light-mode.merge-pdf-page .merge-pdf-use-case-content p {
  color: rgba(30, 41, 59, 0.92);
}

.merge-pdf-page .how-to-use-section .step-content p + p {
  margin-top: 1rem;
}

.merge-pdf-page .tool-card-specific {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 28px;
  background: rgba(10, 15, 44, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.light-mode.merge-pdf-page .tool-card-specific {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(58, 90, 254, 0.1);
}

/* Step Progress Bar */

/* Tool Step Styling */
.tool-step {
  background: var(--tool-card-bg);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--tool-card-shadow);
  margin-top: 20px;
}

.tool-step h2 {
  color: var(--dark-text);
  margin-bottom: 25px;
  text-align: center;
  font-size: 1.8em;
  background: var(--section-header-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--primary-medium);
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter background */
  margin-bottom: 25px;
}

.light-mode .upload-area {
  background: rgba(
    0,
    0,
    0,
    0.03
  ); /* Slightly darker background in light mode */
}

.upload-area.highlight {
  background: rgba(106, 156, 137, 0.2); /* var(--primary-medium) with opacity */
  border-color: var(--primary-dark);
}

.upload-area .drag-drop-text {
  font-size: 1.4em;
  color: var(--primary-light);
  margin-bottom: 10px;
}

.upload-area .or-text {
  font-size: 1em;
  color: var(--dark-text);
  margin: 15px 0;
}

.upload-area .btn-secondary {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  transition: var(--transition);
}

.upload-area .btn-secondary:hover {
  background: var(--secondary-gradient);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.upload-area .file-size-limit {
  font-size: 0.9em;
  color: var(--primary-light);
  margin-top: 20px;
  opacity: 0.8;
}

/* File List */

.file-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 10px;
  color: var(--dark-text);
  transition: var(--transition);
  flex-direction: column;
}

.light-mode .file-list-item {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.file-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.file-name {
  font-weight: bold;
  font-size: 1.1em;
  color: var(--primary-light);
  overflow-wrap: anywhere;
  word-break: break-all; /* Break long names */
  max-width: 100%; /* Ensure it doesn't overflow */
}

.file-details {
  font-size: 0.85em;
  color: var(--dark-text);
  opacity: 0.8;
}

.file-remove {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 1.2em;
  cursor: pointer;
  transition: color 0.3s ease;
}

.file-remove:hover {
  color: #ff6b6b; /* A subtle red for remove */
}

/* Next Step Button */

.next-step-btn,
.prev-step-btn {
  padding: 12px 30px;
  font-size: 1.1em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.next-step-btn {
  background: var(--primary-gradient);
  color: white;
}

.next-step-btn:hover:not(:disabled) {
  background: var(--secondary-gradient);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.next-step-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.prev-step-btn {
  background: var(--light-bg);
  color: var(--dark-text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.light-mode .prev-step-btn {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.prev-step-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.light-mode .prev-step-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .btn-wrapper {
    flex-direction: column;
  }
  .next-step-btn,
  .prev-step-btn {
    width: 100%;
    justify-content: center;
  }
}

.step-progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 100%;
  width: 100%;
  margin: 2rem 0;
  padding: 0;
  flex-wrap: wrap; /* allow wrapping if Arabic text pushes too wide */
  gap: 10px;
}

/*.step-progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-light);
    opacity: 0.3;
    transform: translateY(-50%);
    z-index: 1;
    border-radius: 2px;
}*/

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 80px; /* prevent shrinking too small */
  transition: var(--transition);
}

.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  position: relative;
  /* background: var(--background-light);*/
  color: var(--primary-medium);
  border: 3px solid var(--primary-medium);
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-name {
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  color: var(--primary-medium);
  opacity: 0.7;
  transition: var(--transition);
  line-height: 1.3;
}

/* Active step styling */
.step.active .step-number {
  background: var(--primary-gradient);
  color: white;
  border-color: var(--primary-dark);
  box-shadow: 0 4px 15px rgba(22, 66, 60, 0.3);
  transform: scale(1.1);
}

.step.active .step-number::before {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
}

.step.active .step-number {
  color: transparent;
}

.step.active .step-name {
  opacity: 1;
  font-weight: 600;
}

/* Completed step styling */
.step.completed .step-number {
  background: var(--primary-medium);
  color: transparent;
  border-color: var(--primary-medium);
  box-shadow: 0 2px 10px rgba(106, 156, 137, 0.3);
}

.step.completed .step-number::before {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
}

.step.completed .step-name {
  color: var(--primary-medium);
  opacity: 0.8;
}

/* Progress line between steps */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 25px;
  left: calc(50% + 25px);
  width: calc(100% - 38px);
  height: 3px;
  background: var(--primary-light);
  opacity: 0.3;
  z-index: 1;
  border-radius: 2px;
  transition: var(--transition);
}

.step.active:not(:last-child)::after,
.step.completed:not(:last-child)::after {
  background: var(--primary-medium);
  opacity: 1;
}

/* Hover effects */
.step:hover .step-number {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(22, 66, 60, 0.2);
}

.step:hover .step-name {
  opacity: 1;
}

/* Light mode adjustments 
.light-mode .step-number {
  /*  background: white;
    color: var(--primary-dark);
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(22, 66, 60, 0.1);
}*/

.light-mode .step-name {
  color: var(--primary-dark);
}

/*.light-mode .step.active .step-number {
    background: var(--primary-gradient);
    color: transparent;
    border-color: var(--primary-dark);
}*/

.light-mode .step.active .step-number::before {
  color: white;
}

.light-mode .step.active .step-name {
  color: var(--primary-dark);
}

.light-mode .step.completed .step-number {
  background: var(--primary-medium);
  color: transparent;
}

.light-mode .step.completed .step-number::before {
  color: white;
}

.light-mode .step:hover .step-number {
  box-shadow: 0 4px 12px rgba(22, 66, 60, 0.15);
}

/* Responsive design */
@media (max-width: 768px) {
  .step-progress-bar {
    padding: 0 0.5rem;
    margin: 1.5rem 0;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .step-name {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .step:not(:last-child)::after {
    top: 20px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
  }
}

@media (max-width: 480px) {
  .step-progress-bar {
    flex-direction: column;
    gap: 1.5rem;
  }

  .step-progress-bar::before {
    display: none;
  }

  .step {
    flex-direction: row;
    max-width: 100%;
    width: 100%;
    justify-content: flex-start;
    padding: 1rem;
    background: var(--home-tool-card-bg);
    border: var(--home-tool-card-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
  }

  .step-number {
    margin-bottom: 0;
    margin-inline-end: 1rem;
    flex-shrink: 0;
  }

  .step-name {
    text-align: start;
    flex: 1;
  }

  .step:not(:last-child)::after {
    display: none;
  }
}

/* Styling for the file list and upload area */

.upload-area.highlight {
  background-color: #e0e0e0;
  border-color: #007bff;
}

.drag-drop-text {
  font-size: 1.1em;
  color: #555;
  margin-bottom: 5px;
}

.or-text {
  margin: 10px 0;
  color: #777;
}

.file-size-limit {
  font-size: 0.9em;
  color: #888;
  margin-top: 10px;
}

.file-list {
  margin-top: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  max-height: 400px; /* Max height for scrollable list */
  overflow-y: auto; /* Enable scrolling */
  display: none; /* Hidden by default when no files */
}

.file-list-info {
  margin-top: 12px;
  color: var(--primary-light);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.file-list-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.file-status {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

/* Progress bar styles */
.progress-container {
  display: flex;
  align-items: center;
  width: 100%; /* Take full width below file info */
  margin-top: 10px; /* Space between info and progress */
}

.progress-bar {
  width: calc(100% - 40px); /* Adjust for remove button width */
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0; /* Prevent shrinking */
}

.progress {
  height: 100%;
  width: 0%;
  background-color: #007bff; /* Default blue for uploading */
  border-radius: 4px;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}

.file-list-item.upload-failed .progress {
  background-color: #dc3545; /* Red for failed */
}

.file-list-item.uploaded .progress {
  background-color: #28a745; /* Green for success */
}

/* Remove button styles */
.file-remove {
  background: none;
  border: none;
  color: #dc3545; /* Red color for remove icon */
  cursor: pointer;
  font-size: 1.2em;
  margin-left: 10px;
  padding: 0; /* Remove default button padding */
  width: 30px; /* Fixed width */
  height: 30px; /* Fixed height */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.file-remove:hover {
  color: #bd2130;
}

.file-list-item.removing {
  opacity: 0.6;
  pointer-events: none; /* Disable interaction during removal */
}

/* Alert styling for general errors */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-info {
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.32);
}

.alert-success {
  color: #dcfce7;
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.3);
}

.merge-pdf-status-message {
  margin-top: 15px;
}

.merge-pdf-icon {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e11d48;
  font-size: 35px;
  flex-shrink: 0;
}

.merge-pdf-file-summary,
.merge-pdf-result-file {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .merge-pdf-page .tool-layout-container {
    margin-top: 104px;
  }

  .merge-pdf-page .tool-header {
    padding: 1.6rem 1.2rem;
    border-radius: 22px;
  }

  .merge-pdf-trust-items {
    grid-template-columns: 1fr;
  }

  .merge-pdf-trust-item {
    min-height: auto;
  }

  .merge-pdf-use-cases-wrapper {
    margin-top: 1.4rem;
    padding: 1rem;
  }

  .merge-pdf-use-cases-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .merge-pdf-use-cases {
    grid-template-columns: 1fr;
  }

  .merge-pdf-use-case-card {
    min-height: auto;
    padding: 1rem;
  }

  .merge-pdf-page .tool-card-specific {
    border-radius: 22px;
  }

  .file-list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-info {
    width: 100%;
    margin-right: 0;
  }

  .progress-container {
    width: 100%;
    margin-top: 10px;
    justify-content: space-between; /* Space out progress bar and button */
  }

  .progress-bar {
    width: calc(100% - 40px); /* Adjust for remove button */
  }

  .file-remove {
    margin-left: auto; /* Push to right */
  }
}

.summary-icon {
  font-size: 3rem;
  color: var(--primary-medium);
  opacity: 0.9;
}

/* Generalized Step 3 Download UI Styles (from split-pdf.css) */

.download-container {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}
.download-options {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.files-list {
  text-align: left;
  margin-top: 2rem;
  /* max-height: 300px;
   /* overflow-y: auto;*/
}
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--primary-light);
  transition: var(--transition);
}
.file-item:hover {
  background-color: rgba(106, 156, 137, 0.05);
}
.file-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.file-name {
  font-weight: 600;

  overflow-wrap: anywhere;
  word-break: break-all;
}
.file-pages {
  font-size: 0.85rem;
  color: var(--primary-medium);
}
.file-size {
  font-size: 0.8rem;
  color: var(--light-text);
  opacity: 0.8;
}
.download-btn-small {
  padding: 0.5rem 1rem;
  background: var(--primary-medium);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
  margin-left: 1rem;
}
.download-btn-small:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.success-message {
  color: var(--primary-medium);
  font-size: 1.2em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-direction: column;
}
.success-icon {
  font-size: 3em;
  color: #28a745;
  margin-bottom: 0.2em;
}
@media (max-width: 768px) {
  .download-options {
    flex-direction: column;
    gap: 0.75rem;
  }
  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .download-btn-small {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

.file-order-item i.fas.fa-file-pdf,
.file-list-item i.fas.fa-file-pdf,
.file-item i.fas.fa-file-pdf {
  color: #3a5afe !important; /* your blue */
}

/* Step 1 row layout */
.file-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  width: 100%;
}

/* X button on FAR LEFT */
.file-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.file-remove i {
  color: #e11d48;
  font-size: 20px;
}

/* PDF icon in the middle */
.pdf-icon-wrapper {
  width: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* File info on the RIGHT */
.file-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

@media (max-width: 500px) {
  .file-row .btn {
    width: 100%;
    margin-top: 5px;
    justify-content: center;
  }
}

/* Step 2 File Order List (Grid Layout) */
.file-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  max-width: 1000px;
  margin: 20px auto;
}

.file-order-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 15px;
  cursor: grab;
  transition: all 0.2s ease;
  position: relative;
}

.light-mode .file-order-item {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.file-order-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.12);
}
.light-mode .file-order-item:hover {
  background: rgba(0, 0, 0, 0.08);
}

.file-order-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.drag-handle {
  color: var(--primary-light);
  font-size: 1.2rem;
  margin-right: 12px;
  cursor: grab;
  display: flex;
  align-items: center;
  opacity: 0.7;
}

.file-order-item:hover .drag-handle {
  opacity: 1;
}

.order-badge {
  background: var(--primary-gradient);
  color: white;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 15px;
}

.remove-pdf-btn {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  margin-left: 10px;
  transition: color 0.2s ease;
  opacity: 0.6;
}

.file-order-item:hover .remove-pdf-btn {
  opacity: 1;
}

.remove-pdf-btn:hover {
  color: #ff6b6b;
}

@media (max-width: 600px) {
  .file-order-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .merge-pdf-page .tool-title {
    font-size: 2.2rem;
  }

  .merge-pdf-eyebrow {
    width: 100%;
    padding-inline: 0.85rem;
    letter-spacing: 0.08em;
  }
}
