.pba-card {
  max-width: 600px;
  padding: 24px;
  margin-top: 24px;
  background: #f6fbff;
  border: 1px solid #cfe6ff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  font-family: system-ui, sans-serif;
}

.pba-card h2 {
  margin-bottom: 16px;
}

.pba-card label {
  display: block;
  margin-top: 12px;
  font-weight: 500;
}

.pba-card input,
.pba-card select {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.pba-btn {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: #ffffff;
  color: #2563eb;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pba-error {
  border-color: #ef4444;
}

.pba-error-msg {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 4px;
}

.pba-captcha {
  margin-top: 15px;
}

.pba-hint {
  display: block;
  font-size: 0.8rem;
  color: #666;
}

.pba-card button:disabled:hover {
    background-color: #cccccc !important;
    cursor: not-allowed !important;
}

.pba-output {
  background: #f9fafb;
  color: #1f2937;
  border-left: 4px solid #2563eb;
  padding: 16px;
  margin-top: 20px;
  white-space: pre-line;
  font-size: 15.5px;
  line-height: 1.75;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.pba-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.pba-btn:hover {
  background: #2563eb;
  color: #ffffff;
}

.pba-wa {
  border-color: #16a34a;
  color: #16a34a;
  align:center;
}

.pba-wa:hover {
  background: #16a34a;
  color: #ffffff;
}

.hidden {
  display: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pba-story-frame {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1080px;
  height: 1920px;
  background: #ffffff;
  padding: 120px 96px;
  box-sizing: border-box;
  font-family: 'Inter', Arial, sans-serif;
  color: #1a1a1a;
  
}

.pba-story-header {
  text-align: center;
  margin-bottom: 96px;
}

.pba-story-logo {
  max-width: 390px;
  margin-bottom: 30px;
}

.pba-story-header h1 {
  font-size: 40px;
  line-height: 1;
  margin: 0;
  font-weight: 700;
}

.pba-story-content {
  font-size: 23px;
  line-height: 1.5;
}

/* Judul section */
.pba-story-content strong {
  display: block;
  font-size: 30px;
  margin-top: 20px;
  margin-bottom: 16px;
  font-weight: 600;
  color: #000000;
}

/* Paragraf isi */
.pba-story-content p {
  margin: 0 0 24px;
}

.pba-story-footer {
  position: absolute;
  bottom: 64px;
  width: 100%;
  text-align: center;
  font-size: 23px;
  color: #777;
}

.pba-pdf-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 10px;
  color: #777;
}


/* Default: tidak terlihat di layar */
#pba-pdf-wrapper {
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

/* PRINT MODE */
@media print {

  body * {
    visibility: hidden;
  }

  #pba-pdf-wrapper,
  #pba-pdf-wrapper * {
    visibility: visible;
  }

  @page {
    size: A4;
    margin: 12mm;
  }

  #pba-pdf-wrapper {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .pba-pdf-header {
    margin-bottom: 16px;
    page-break-after: avoid;
  }

  .pba-pdf-section {
    margin-bottom: 10px;
    page-break-inside: auto;
  }

  .pba-pdf-footer {
    margin-top: 16px;
    page-break-before: avoid;
  }
}


.pba-scope .pba-btn {
  background: #2563eb;
}

.pba-result-wrapper {
  visibility: hidden;
  /*display: none;*/
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

/* Visible state */
.pba-result-wrapper.is-visible {
  visibility: visible;
  /*display: block;*/
  opacity: 1;
  height: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#pba-form input:disabled,
#pba-form select:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

#pba-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pba-loading {
  margin-top: 24px;
  text-align: center;
  animation: fadeUp 0.3s ease;
}

.pba-loading p {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #444;
}

/* Spinner */
.pba-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pba-result-wrapper.is-visible {
  animation: fadeUp 0.4s ease;
}