/* File: assets/css/builder.css */

/* Dark theme wrapper (scoped) */
.cbpb-wrap {
  --bg: #0b1220;
  --card: #101a2e;
  --text: #e8eefc;
  --muted: #a9b5d6;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #7c5cff;
  --good: #22c55e;

  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  color: var(--text);
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 40px;

  background:
    radial-gradient(
      1200px 700px at 10% 10%,
      rgba(124, 92, 255, 0.25),
      transparent 55%
    ),
    radial-gradient(
      1000px 600px at 90% 20%,
      rgba(34, 197, 94, 0.18),
      transparent 50%
    ),
    var(--bg);
  border-radius: 16px;
}

.cbpb-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.cbpb-title {
  max-width: 720px;
}
.cbpb-h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
}
.cbpb-muted {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}
.cbpb-small {
  font-size: 12px;
}

.cbpb-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
}

.cbpb-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
}
@media (max-width: 920px) {
  .cbpb-grid {
    grid-template-columns: 1fr;
  }
}

.cbpb-panel {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 14px;
}

/* Single center panel (login/access screens) */
.cbpb-panel--single {
  max-width: 720px;
  margin: 0 auto;
}

.cbpb-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  font-size: 12px;
  color: var(--text);
  margin-bottom: 12px;
}
.cbpb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  flex: 0 0 auto;
}

.cbpb-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}
.cbpb-section:last-child {
  margin-bottom: 0;
}

.cbpb-h3 {
  margin: 0 0 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cbpb-tag {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.cbpb-field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.cbpb-field:last-child {
  margin-bottom: 0;
}

.cbpb-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) {
  .cbpb-row2 {
    grid-template-columns: 1fr;
  }
}

.cbpb-row4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 920px) {
  .cbpb-row4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .cbpb-row4 {
    grid-template-columns: 1fr;
  }
}

.cbpb-span2 {
  grid-column: span 2;
}
@media (max-width: 520px) {
  .cbpb-span2 {
    grid-column: span 1;
  }
}

.cbpb-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
}

.cbpb-wrap label {
  font-size: 12px;
  color: var(--text);
  opacity: 0.95;
}

.cbpb-wrap select,
.cbpb-wrap input[type="text"] {
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 30, 0.55);
  color: var(--text);
  outline: none;
}

.cbpb-wrap select:focus,
.cbpb-wrap input[type="text"]:focus {
  border-color: rgba(124, 92, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.cbpb-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cbpb-btn {
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.cbpb-primary {
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.95),
    rgba(124, 92, 255, 0.55)
  );
  border-color: rgba(124, 92, 255, 0.55);
}

.cbpb-toast {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.cbpb-outHead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.cbpb-promptBox {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  min-height: 220px;
  white-space: pre-wrap;
  line-height: 1.35;
  font-size: 13px;
  color: var(--text);
  margin-top: 10px;
}

.cbpb-mini {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.cbpb-hidden {
  display: none !important;
}

/* Login button for Step 3/4 screens */
.cbpb-loginBtn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.95),
    rgba(124, 92, 255, 0.55)
  );
  color: #fff;
  border: 1px solid rgba(124, 92, 255, 0.55);
}
.cbpb-loginBtn:hover {
  opacity: 0.95;
}
