/* Builder export/global design system classes */

/*
  디자인 토큰: 폰트/라인하이트/색상/텍스트 폭
  - 에디터 프리뷰와 내보내기 HTML 모두 이 토큰과 pb-* 클래스를 공유한다.
*/
:root {
  /* Font sizes (rem 단위, Tailwind 스케일과 유사) */
  --pb-font-xs: 0.75rem;   /* 12px */
  --pb-font-sm: 0.875rem;  /* 14px */
  --pb-font-base: 1rem;    /* 16px */
  --pb-font-lg: 1.125rem;  /* 18px */
  --pb-font-xl: 1.25rem;   /* 20px */
  --pb-font-2xl: 1.5rem;   /* 24px */
  --pb-font-3xl: 1.875rem; /* 30px */

  /* Line heights */
  --pb-leading-tight: 1.25;
  --pb-leading-snug: 1.35;
  --pb-leading-normal: 1.5;
  --pb-leading-relaxed: 1.7;
  --pb-leading-loose: 1.9;

  /* Text colors (팔레트) */
  --pb-color-text-default: #e5e7eb; /* slate-200 정도 */
  --pb-color-text-muted: #9ca3af;   /* slate-400 */
  --pb-color-text-strong: #f9fafb;  /* slate-50 */
  --pb-color-text-accent: #38bdf8;  /* sky-400 */
  --pb-color-text-danger: #f97373;  /* red-400 근처 */

  /* Text max width */
  --pb-text-maxw-prose: 60ch;
  --pb-text-maxw-narrow: 40ch;
}

/* 에디터/프리뷰 공통 기본 타이포 설정 (em/rem 기반) */
body {
  margin: 0;
  padding: 0;
  font-size: 1rem;      /* 기본 16px 기준 */
  line-height: 1.5;     /* 읽기 좋은 기본 라인하이트 */
  letter-spacing: 0em;  /* 기본 글자 간격은 0em */
}

/* Static export root layout */
.pb-root {
  display: block;
}

.pb-root-inner {
  max-width: 72rem; /* ~1152px */
  margin-inline: auto;
  padding-inline: 1.5rem;
  padding-block: 2.5rem;
}

.pb-section {
  display: block;
}

.pb-section-inner {
  padding-inline: 1.5rem;
}

.pb-section-columns {
  display: flex;
  gap: 2rem;
}

.pb-section-column {
  flex: 1 1 0;
}

/* Section background video */
.pb-section-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}

/* Text alignment */
.pb-text-left {
  text-align: left;
}
.pb-text-center {
  text-align: center;
}
.pb-text-right {
  text-align: right;
}

/* Text size scale (디자인 토큰 기반) */
.pb-text-xs {
  font-size: var(--pb-font-xs);
}
.pb-text-sm {
  font-size: var(--pb-font-sm);
}
.pb-text-base {
  font-size: var(--pb-font-base);
}
.pb-text-lg {
  font-size: var(--pb-font-lg);
}
.pb-text-xl {
  font-size: var(--pb-font-xl);
}
.pb-text-2xl {
  font-size: var(--pb-font-2xl);
}
.pb-text-3xl {
  font-size: var(--pb-font-3xl);
}

/* Line-height scale */
.pb-leading-tight {
  line-height: var(--pb-leading-tight);
}
.pb-leading-snug {
  line-height: var(--pb-leading-snug);
}
.pb-leading-normal {
  line-height: var(--pb-leading-normal);
}
.pb-leading-relaxed {
  line-height: var(--pb-leading-relaxed);
}
.pb-leading-loose {
  line-height: var(--pb-leading-loose);
}

/* Font weight scale */
.pb-font-normal {
  font-weight: 400;
}
.pb-font-medium {
  font-weight: 500;
}
.pb-font-semibold {
  font-weight: 600;
}
.pb-font-bold {
  font-weight: 700;
}

/* Text color palette */
.pb-text-color-default {
  color: var(--pb-color-text-default);
}
.pb-text-color-muted {
  color: var(--pb-color-text-muted);
}
.pb-text-color-strong {
  color: var(--pb-color-text-strong);
}
.pb-text-color-accent {
  color: var(--pb-color-text-accent);
}
.pb-text-color-danger {
  color: var(--pb-color-text-danger);
}

/* Additional text colors for presets */
.pb-text-color-success {
  color: #22c55e;
}
.pb-text-color-warning {
  color: #eab308;
}
.pb-text-color-info {
  color: #0ea5e9;
}
.pb-text-color-neutral {
  color: #94a3b8;
}

/* Text decoration & style */
.pb-underline {
  text-decoration-line: underline;
}
.pb-line-through {
  text-decoration-line: line-through;
}
.pb-italic {
  font-style: italic;
}

/* Text max width presets */
.pb-text-maxw-prose {
  max-width: var(--pb-text-maxw-prose);
}
.pb-text-maxw-narrow {
  max-width: var(--pb-text-maxw-narrow);
}

.pb-whitespace-pre-wrap {
  white-space: pre-wrap;
}

.pb-scroll {
  scrollbar-width: thin;
  scrollbar-color: #1f2937 #020617;
}

.pb-scroll::-webkit-scrollbar {
  width: 8px;
}

.pb-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.pb-scroll::-webkit-scrollbar-thumb {
  background-color: #1f2937;
  border-radius: 9999px;
  border: 2px solid #020617;
}

.pb-scroll::-webkit-scrollbar-thumb:hover {
  background-color: #374151;
}

.pb-video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
}

.pb-video-wrapper--4by3 {
  padding-bottom: 75%;
}

.pb-video-wrapper--1by1 {
  padding-bottom: 100%;
}

.pb-video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.pb-video-caption {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.pb-btn-base {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  border-width: 1px;
  text-decoration: none;
}
.pb-btn-size-xs {
  padding: 0.125rem 0.5rem;
}
.pb-btn-size-sm {
  padding: 0.25rem 0.75rem;
}
.pb-btn-size-md {
  padding: 0.375rem 1rem;
}
.pb-btn-size-lg {
  padding: 0.5rem 1.25rem;
}
.pb-btn-size-xl {
  padding: 0.75rem 1.5rem;
}

.pb-btn-radius-none {
  border-radius: 0;
}
.pb-btn-radius-sm {
  border-radius: 0.25rem;
}
.pb-btn-radius-md {
  border-radius: 0.5rem;
}
.pb-btn-radius-lg {
  border-radius: 0.75rem;
}
.pb-btn-radius-full {
  border-radius: 9999px;
}

.pb-btn-variant-solid-primary {
  background-color: #0ea5e9;
  border-color: #0284c7;
  color: #0b1120;
}
.pb-btn-variant-solid-muted {
  background-color: #1f2937;
  border-color: #4b5563;
  color: #e5e7eb;
}
.pb-btn-variant-solid-danger {
  background-color: #ef4444;
  border-color: #b91c1c;
  color: #f9fafb;
}
.pb-btn-variant-solid-success {
  background-color: #22c55e;
  border-color: #15803d;
  color: #022c22;
}
.pb-btn-variant-solid-neutral {
  background-color: #4b5563;
  border-color: #374151;
  color: #e5e7eb;
}

.pb-btn-variant-outline-primary {
  background-color: transparent;
  border-color: #38bdf8;
  color: #e0f2fe;
}
.pb-btn-variant-outline-muted {
  background-color: transparent;
  border-color: #4b5563;
  color: #e5e7eb;
}
.pb-btn-variant-outline-danger {
  background-color: transparent;
  border-color: #f97373;
  color: #fecaca;
}
.pb-btn-variant-outline-success {
  background-color: transparent;
  border-color: #22c55e;
  color: #bbf7d0;
}
.pb-btn-variant-outline-neutral {
  background-color: transparent;
  border-color: #64748b;
  color: #e5e7eb;
}

.pb-btn-variant-ghost-primary {
  background-color: transparent;
  border-color: transparent;
  color: #38bdf8;
}
.pb-btn-variant-ghost-muted {
  background-color: transparent;
  border-color: transparent;
  color: #9ca3af;
}
.pb-btn-variant-ghost-danger {
  background-color: transparent;
  border-color: transparent;
  color: #f97373;
}
.pb-btn-variant-ghost-success {
  background-color: transparent;
  border-color: transparent;
  color: #4ade80;
}
.pb-btn-variant-ghost-neutral {
  background-color: transparent;
  border-color: transparent;
  color: #cbd5f5;
}

/* Section background variants */
.pb-section-bg-default {
  background-color: rgba(15, 23, 42, 0.6); /* slate-900/60 느낌 */
}
.pb-section-bg-muted {
  background-color: rgba(15, 23, 42, 0.4); /* slate-950/40 느낌 */
}
.pb-section-bg-primary {
  background-color: rgba(8, 47, 73, 0.4); /* sky-950/40 느낌 */
  border-color: rgba(8, 47, 73, 0.6);
}

/* Section vertical padding scale */
.pb-section-py-sm {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.pb-section-py-md {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.pb-section-py-lg {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

/* Simple form styling for static export */
.pb-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 40rem;
}

/* Form 컨트롤러용 최소 폼: 레이아웃에 영향이 없도록 margin/padding 을 0 으로 고정한다. */
.pb-form-controller {
  margin: 0;
  padding: 0;
}

.pb-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pb-form-label {
  font-size: 0.75rem;
  color: #e5e7eb;
}

.pb-form-option {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #e5e7eb;
}

.pb-input,
.pb-select,
.pb-textarea {
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid #1f2937;
  background-color: #020617;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: #e5e7eb;
  box-sizing: border-box;
}

.pb-textarea {
  min-height: 6rem;
}

/* List styling for static export */
.pb-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: var(--pb-leading-normal);
  color: var(--pb-color-text-default);
}

