/* ==========================================================================
   CONVERTER COMPONENTS & INTERACTIVE UI STYLES
   ========================================================================== */

/* Breadcrumbs Component */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  padding: 0.6rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.breadcrumbs a {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.breadcrumbs span {
  color: var(--text-primary);
  font-weight: 600;
}

.breadcrumbs-separator,
.breadcrumbs span.separator {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Converter Main Layout Container */
.converter-wrapper {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
  backdrop-filter: blur(12px);
}

.converter-header {
  text-align: center;
  margin-bottom: 2rem;
}

.converter-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.converter-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Drag and Drop Zone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 3.5rem 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: var(--shadow-glow);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform var(--transition-normal);
}

.dropzone:hover .dropzone-icon {
  transform: translateY(-4px) scale(1.05);
}

.dropzone-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dropzone-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.file-input-hidden {
  display: none;
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-hover);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Conversion Control Settings Panel */
.controls-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-select, .control-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.control-select:focus, .control-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Range Slider */
.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.control-range {
  flex: 1;
  accent-color: var(--accent-primary);
  height: 6px;
  border-radius: 3px;
}

/* File Preview List */
.file-list {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.file-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color var(--transition-fast);
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.file-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-tertiary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-details {
  min-width: 0;
}

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

.file-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.file-status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}

.status-ready { background: rgba(99, 102, 241, 0.15); color: var(--accent-primary); }
.status-converting { background: var(--warning-bg); color: var(--warning); }
.status-done { background: var(--success-bg); color: var(--success); }
.status-error { background: var(--danger-bg); color: var(--danger); }

/* Progress Bar Component */
.progress-container {
  width: 100%;
  margin: 1.5rem 0;
  display: none;
}

.progress-container.active {
  display: block;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.2s linear;
}

/* FAQ Accordion Component */
.faq-section {
  margin: 3.5rem 0 2rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-question {
  padding: 1.25rem;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-toggle-icon {
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-toggle-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 1.25rem 1.25rem;
}

/* AdSense Container Containers (Non-Deceptive & Responsive) */
.ad-container {
  margin: 2rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 600px) {
  .converter-wrapper {
    padding: 1.25rem;
  }
  .controls-panel {
    grid-template-columns: 1fr;
  }
  .file-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Interactive PDF Crop Viewport & Drag Handles */
.pdf-crop-viewport {
  position: relative;
  display: inline-block;
  user-select: none;
  margin: 1.5rem auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  background: #ffffff;
  max-width: 100%;
}

.crop-overlay-box {
  position: absolute;
  border: 2px dashed #6366f1;
  background: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  cursor: move;
  box-sizing: border-box;
}

.crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #06b6d4;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.crop-handle-nw { top: -7px; left: -7px; cursor: nwse-resize; }
.crop-handle-ne { top: -7px; right: -7px; cursor: nesw-resize; }
.crop-handle-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.crop-handle-se { bottom: -7px; right: -7px; cursor: nwse-resize; }

/* Side-by-side Crop Layout Grid */
.crop-workspace-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .crop-workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* About Tool Section & Specification Tables */
.about-tool-section {
  margin-top: 3rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: var(--shadow-md);
}

.about-tool-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.step-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.step-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
}

.step-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.spec-table th,
.spec-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.spec-table th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
}

.spec-table tr:hover {
  background: rgba(99, 102, 241, 0.04);
}



