/* ---------------------------------------------
   word-to-pdf.css – clean, responsive, professional
   no frameworks, only modern vanilla CSS
--------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(145deg, #f6f9fc 0%, #e9f0f5 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  color: #1a2b3c;
  line-height: 1.5;
}

.wrapper {
  max-width: 1100px;
  width: 100%;
}

.converter-card {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 20px 40px -10px rgba(0,20,40,0.12), 0 8px 16px -8px rgba(0,20,40,0.1);
  padding: 2.2rem 2rem;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.5);
}

h1 {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
  color: #0a2c3d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-badge {
  font-size: 0.9rem;
  background: #ecf7f0;
  color: #1e5f4b;
  padding: 0.6rem 1.2rem;
  border-radius: 60px;
  display: inline-block;
  margin: 0.25rem 0 1.5rem 0;
  border-left: 4px solid #2d9c7c;
  font-weight: 450;
  width: fit-content;
}

/* ---------- UPLOAD / DROP ZONE ---------- */
.upload-area {
  background: #fafcfe;
  border-radius: 24px;
  padding: 0.5rem;
  margin-bottom: 2rem;
}

.drop-zone {
  border: 2px dashed #b8cddb;
  border-radius: 20px;
  background: white;
  padding: 2rem 1rem;
  text-align: center;
  transition: border 0.2s, background 0.2s;
  cursor: pointer;
  color: #2c4a5e;
}

.drop-zone:hover {
  border-color: #2d9c7c;
  background: #f2faf8;
}

.drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.drop-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.drop-zone p {
  font-size: 1.1rem;
  color: #3e5e6f;
  margin: 0.25rem 0;
}

/* file status bar */
.file-status {
  background: #e3f0ef;
  border-radius: 60px;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: #0a3b3b;
  border: 1px solid #b4dbd5;
  margin-top: 0.5rem;
}

.file-label {
  font-size: 1.3rem;
}

#fileNameDisplay {
  font-weight: 600;
  word-break: break-word;
  flex: 1;
}

/* ---------- BUTTONS ---------- */
.btn {
  border: none;
  background: transparent;
  font-weight: 550;
  padding: 0.75rem 1.8rem;
  border-radius: 60px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: #0f5e5e;
  color: white;
  box-shadow: 0 6px 14px rgba(15,94,94,0.25);
}

.btn-primary:hover:not(:disabled) {
  background: #0b4a4a;
  transform: scale(0.98);
  box-shadow: 0 4px 10px rgba(15,94,94,0.3);
}

.btn-secondary {
  background: white;
  border: 1px solid #aac4ce;
  color: #1c4a5c;
}

.btn-secondary:hover:not(:disabled) {
  background: #e7f1f5;
  border-color: #5f9ea0;
}

.btn-outline {
  background: white;
  border: 1.5px solid #6c9eb3;
  color: #1f5068;
  padding: 0.5rem 1.6rem;
}

.btn-outline:hover {
  background: #e1eff5;
  border-color: #2d7a8c;
}

.btn-sm {
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
  pointer-events: none;
}

/* ---------- PREVIEW SECTION ---------- */
.preview-wrapper {
  margin: 1.8rem 0 1.2rem;
}

.preview-wrapper h2 {
  font-size: 1.3rem;
  font-weight: 550;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 0.8rem;
  color: #1c4a5c;
}

.preview-badge {
  font-size: 0.75rem;
  background: #dbecec;
  padding: 0.2rem 0.8rem;
  border-radius: 40px;
  color: #0a4e4e;
  font-weight: 450;
}

.preview-container {
  background: white;
  border: 1px solid #dbe5ea;
  border-radius: 16px;
  padding: 1.8rem;
  min-height: 240px;
  max-height: 560px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1f2e3a;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.02);
  width: 100%;
  max-width: 800px;       /* good base for html2canvas capture */
  margin-left: auto;
  margin-right: auto;
  transition: all 0.1s;
}

/* styling for mammoth-generated content */
.preview-container p {
  margin-bottom: 0.75rem;
}

.preview-container h1,
.preview-container h2,
.preview-container h3 {
  color: #0e4b5c;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

.preview-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ---------- ACTION BAR ---------- */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  border-top: 1px solid #e2ecf0;
  padding-top: 2rem;
}

/* ---------- ERROR MESSAGE ---------- */
.error-box {
  margin-top: 1rem;
  background: #ffebec;
  border-left: 6px solid #c8373f;
  border-radius: 12px;
  padding: 0.9rem 1.5rem;
  color: #81202a;
  font-weight: 480;
  font-size: 0.95rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .converter-card {
    padding: 1.6rem 1.2rem;
  }
  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
  }
  .preview-container {
    padding: 1rem;
  }
}