/* shared/components.css — Admin Guru | v1.0 | 2026-05-02 */

/* ════════════════════════════════════════════════════════════
   BAGIAN 1: STEP GUIDE BANNER
   ════════════════════════════════════════════════════════════ */

.step-guide-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: color-mix(in srgb, var(--color-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 20%, transparent);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.step-guide-final {
  background: color-mix(in srgb, var(--color-btn-success) 8%, transparent);
  border-color: color-mix(in srgb, var(--color-btn-success) 20%, transparent);
  border-left-color: var(--color-btn-success);
}

.step-guide-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.step-guide-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-guide-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
}

.step-guide-final .step-guide-text strong {
  color: var(--color-btn-success);
}

.step-guide-text span {
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .step-guide-banner {
    padding: 12px;
    gap: 10px;
  }

  .step-guide-icon {
    font-size: 18px;
  }

  .step-guide-text strong {
    font-size: 12px;
  }

  .step-guide-text span {
    font-size: 11px;
  }
}

/* ════════════════════════════════════════════════════════════
   BAGIAN 2: PREVIEW EMPTY STATE
   ════════════════════════════════════════════════════════════ */

.preview-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  gap: 16px;
  text-align: center;
  padding: 40px;
  color: var(--ink-faint);
}

.preview-empty-icon {
  font-size: 56px;
  opacity: 0.35;
}

.preview-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-light);
}

.preview-empty-desc {
  font-size: 13px;
  line-height: 1.6;
  max-width: 280px;
  color: var(--ink-faint);
}

.preview-empty-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  text-align: left;
  width: 100%;
  max-width: 320px;
}

.preview-empty-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-light);
  background: var(--paper-warm);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ui-border);
}

.preview-empty-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--color-btn-primary-txt);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .preview-empty-state {
    min-height: 300px;
    padding: 24px 16px;
    gap: 12px;
  }

  .preview-empty-icon {
    font-size: 44px;
  }

  .preview-empty-title {
    font-size: 14px;
  }

  .preview-empty-steps {
    max-width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════
   BAGIAN 3: PROMPT MODE
   ════════════════════════════════════════════════════════════ */

.prompt-mode-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0;
}

.prompt-mode-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.prompt-mode-buttons .btn-copy,
.prompt-mode-buttons .btn-copy-oneshot {
  width: 100%;
  min-height: 42px;
  margin-top: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  font-family: var(--font-ui);
  transition: all var(--transition-fast);
}

.prompt-mode-buttons .btn-copy {
  background: var(--color-btn-secondary);
  color: var(--color-btn-secondary-txt);
}

.prompt-mode-buttons .btn-copy:hover {
  background: var(--color-btn-secondary-hv);
}

.prompt-mode-buttons .btn-copy-oneshot {
  background: var(--color-btn-success);
  color: var(--color-btn-primary-txt);
}

.prompt-mode-buttons .btn-copy-oneshot:hover {
  background: var(--color-btn-success-hv);
}

.btn-copy.copy-sukses,
.btn-copy-oneshot.copy-sukses {
  background: var(--color-btn-neutral) !important;
  color: var(--color-btn-neutral-txt) !important;
  border-color: transparent !important;
}

@media (max-width: 560px) {
  .prompt-mode-buttons {
    grid-template-columns: 1fr;
  }
}

.prompt-mode-info {
  background: var(--color-bg-section);
  border: 1px solid var(--color-border-panel);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-mode-info-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text-primary);
  margin: 0;
}

.prompt-mode-card {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border-panel);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.prompt-card-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text-primary);
  margin: 0 0 4px 0;
}

.prompt-card-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   BAGIAN 4: MODAL
   ════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog,
.modal-content {
  background: var(--color-bg-panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-panel);
  flex-shrink: 0;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--ink-faint);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  background: var(--color-bg-hover);
  color: var(--ink);
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border-panel);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .modal-dialog,
  .modal-content {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-body {
    padding: 12px 16px;
  }

  .modal-footer {
    padding: 12px 16px;
  }
}
