/* ── Project Creator Panel ────────────────────────────── */

/* Top row: project picker + archive filter */
.pc-top-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.pc-top-row .form-group {
  flex: 1;
}

.pc-top-row .form-group:last-child {
  flex: 0 0 120px;
}

/* Card (shown when project selected or new) */
.pc-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  background: var(--card-bg, #fff);
}

.pc-form-row {
  display: flex;
  gap: 12px;
}

.pc-form-row .form-group {
  flex: 1;
}

.project-private-field {
  margin-top: 2px;
}

.project-private-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  margin-bottom: 0;
}

.project-private-toggle input[type="checkbox"] {
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: initial;
  -webkit-appearance: checkbox;
  appearance: checkbox;
  accent-color: var(--ink-cobalt);
  cursor: pointer;
}

#projectCreatorPage .btn {
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid var(--rule-line);
  border-radius: var(--radius-btn);
  background: var(--bg-surface);
  color: var(--fg-secondary);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

#projectCreatorPage .btn.primary {
  border-color: var(--ink-cobalt);
  background: var(--ink-cobalt);
  color: var(--fg-on-cobalt);
}

#projectCreatorPage .btn:active {
  background: var(--bg-canvas);
}

#projectCreatorPage .btn.primary:active {
  background: var(--ink-cobalt-deep);
}

#projectCreatorPage .btn-sm {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

body[data-mode="simple"] #projectCreatorPage .btn-sm {
  min-height: 44px;
}

@media (max-width: 430px) {
  .pc-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pc-form-row .form-group:nth-child(3),
  .pc-form-row .form-group:only-child {
    grid-column: 1 / -1;
  }
}

.pc-actions {
  display: flex;
  gap: 8px;
}

.pc-actions .btn {
  flex: 1;
}

/* SMART chat section */
.pc-smart-section {
  margin-top: 12px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 12px;
}

.pc-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  font-weight: 600;
}

.pc-chat-messages {
  max-height: min(60vh, 480px);
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pc-chat-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.pc-chat-bubble.user {
  align-self: flex-end;
  background: var(--primary-bg, #e8f0fe);
}

.pc-chat-bubble.assistant {
  align-self: flex-start;
  background: var(--surface-bg, #f5f5f5);
}

.pc-chat-suggestion {
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px dashed var(--primary-color, #4285f4);
  border-radius: 8px;
  background: var(--suggestion-bg, #f0f7ff);
}

.pc-chat-suggestion-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.pc-chat-suggestion button {
  margin-top: 6px;
}

.pc-chat-input-row {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color, #e0e0e0);
}

.pc-chat-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border-color, #ccc);
  border-radius: 6px;
  font-size: 14px;
}
