/* ============================================
   Form Theme CSS - NIB OSS Konsultan
   Shared styles for all form templates
   ============================================ */

/* ────────────────────────────────────────────
   1. BASE & TYPOGRAPHY
   ──────────────────────────────────────────── */
body {
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, label {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ────────────────────────────────────────────
   2. FORM SECTIONS & ANIMATIONS
   ──────────────────────────────────────────── */
.form-section {
  display: none;
}

.form-section.active {
  display: block;
  animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 0.8s linear infinite;
}

/* ────────────────────────────────────────────
   3. INPUT COMPONENTS
   ──────────────────────────────────────────── */
.input-base {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #CBD5E0;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #1A202C;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  background: white;
}

.input-base:focus {
  border-color: #003DA5;
  box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.1);
}

.input-base::placeholder {
  color: #A0AEC0;
}

.input-base:disabled {
  background: #F7FAFC;
  color: #A0AEC0;
  cursor: not-allowed;
}

.input-base.error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input-base.success {
  border-color: #059669;
}

textarea.input-base {
  resize: vertical;
}

/* ────────────────────────────────────────────
   4. LABELS & HINTS
   ──────────────────────────────────────────── */
.label-base {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2D3748;
  margin-bottom: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.required::after {
  content: ' *';
  color: #DC2626;
}

.hint {
  font-size: 0.775rem;
  color: #718096;
  margin-top: 4px;
  line-height: 1.5;
}

.hint.hidden {
  display: none;
}

/* ────────────────────────────────────────────
   5. ERROR MESSAGES
   ──────────────────────────────────────────── */
.input-error-msg {
  font-size: 0.75rem;
  color: #DC2626;
  margin-top: 4px;
  display: none;
}

.input-error-msg.visible {
  display: block;
}

/* ────────────────────────────────────────────
   6. PROGRESS BAR
   ──────────────────────────────────────────── */
.progress-bar {
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 28px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #003DA5, #1A56C4);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ────────────────────────────────────────────
   7. STEP INDICATORS
   ──────────────────────────────────────────── */
.step-indicator {
  transition: all 0.2s;
}

.step-indicator.done {
  background: #003DA5;
  color: white;
  border-color: #003DA5;
}

.step-indicator.active {
  background: white;
  color: #003DA5;
  border-color: #003DA5;
  font-weight: 700;
}

.step-indicator.pending {
  background: white;
  color: #A0AEC0;
  border-color: #CBD5E0;
}

/* ────────────────────────────────────────────
   8. BUTTONS
   ──────────────────────────────────────────── */
.btn-primary {
  background: #003DA5;
  color: white;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: #002B75;
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: #003DA5;
  border: 2px solid #003DA5;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #EBF2FF;
}

/* ────────────────────────────────────────────
   9. RADIO CARDS
   ──────────────────────────────────────────── */
.radio-card {
  border: 2px solid #CBD5E0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.radio-card:has(input:checked) {
  border-color: #003DA5;
  background: #EBF2FF;
}

/* ────────────────────────────────────────────
   10. CHECKBOX CARDS
   ──────────────────────────────────────────── */
.check-card {
  border: 2px solid #CBD5E0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.check-card:has(input:checked) {
  border-color: #003DA5;
  background: #EBF2FF;
}

/* ────────────────────────────────────────────
   11. TAG-STYLE CHECKBOX (P-IRT)
   ──────────────────────────────────────────── */
.tag-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #CBD5E0;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4A5568;
  transition: all 0.15s;
  margin: 3px;
}

.tag-check:has(input:checked) {
  border-color: #003DA5;
  background: #EBF2FF;
  color: #003DA5;
}

.tag-check input {
  display: none;
}

/* ────────────────────────────────────────────
   12. UPLOAD ZONE
   ──────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed #CBD5E0;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.upload-zone:hover {
  border-color: #003DA5;
  background: #F4F7FB;
}

.upload-zone.dragover {
  border-color: #003DA5;
  background: #EBF2FF;
}

.upload-zone.has-file {
  border-color: #059669;
  border-style: solid;
}

/* ────────────────────────────────────────────
   13. INPUT PREFIX / SUFFIX
   ──────────────────────────────────────────── */
.input-prefix {
  display: flex;
}

.input-prefix .pfx {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1.5px solid #CBD5E0;
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: #F7FAFC;
  color: #718096;
  font-size: 0.85rem;
  white-space: nowrap;
}

.input-prefix .input-base {
  border-radius: 0 8px 8px 0;
}

.input-suffix {
  display: flex;
}

.input-suffix .input-base {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.input-suffix .sfx {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1.5px solid #CBD5E0;
  border-radius: 0 8px 8px 0;
  background: #F7FAFC;
  color: #718096;
  font-size: 0.85rem;
}

/* ────────────────────────────────────────────
   14. SUB-SECTION DIVIDER
   ──────────────────────────────────────────── */
.sub-divider {
  border: none;
  border-top: 1.5px dashed #E2E8F0;
  margin: 4px 0;
}

/* ────────────────────────────────────────────
   15. SUMMARY SECTION
   ──────────────────────────────────────────── */
.summary-row {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #F0F0F0;
  font-size: 0.85rem;
}

.summary-label {
  color: #718096;
  font-weight: 600;
  min-width: 200px;
  flex-shrink: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.summary-value {
  color: #1A202C;
}

.summary-section-title,
.summary-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #003DA5;
  margin: 16px 0 8px;
}

/* ────────────────────────────────────────────
   16. GRID LAYOUTS
   ──────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* ────────────────────────────────────────────
   17. P-IRT INFO BOX
   ──────────────────────────────────────────── */
.pirt-info {
  background: linear-gradient(135deg, #EBF2FF, #F4F7FB);
  border: 1px solid #BFD4F5;
  border-radius: 12px;
  padding: 16px;
}

/* ────────────────────────────────────────────
   18. RESPONSIVE
   ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
