/* Pure Blank Requests v1.2 – Clean Minimal + Chat */
.pbr-wrapper {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #111827;
  line-height: 1.5;
}

.pbr-header { text-align: center; margin-bottom: 40px; }
.pbr-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}
.pbr-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: #111827;
}
.pbr-subtitle {
  font-size: 1.05rem;
  color: #6b7280;
  margin: 0;
  max-width: 540px;
}
.pbr-header-row .pbr-subtitle { margin-left: 0; }

.pbr-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Form */
.pbr-field { margin-bottom: 24px; }
.pbr-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}
.pbr-label .req { color: #ef4444; }
.pbr-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
}
.pbr-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.pbr-textarea { resize: vertical; min-height: 100px; }
.pbr-hint { font-size: 0.8rem; color: #9ca3af; margin: 6px 0 0; }
.pbr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 540px) { .pbr-row { grid-template-columns: 1fr; } }

.pbr-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pbr-pill {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  color: #374151;
}
.pbr-pill:hover { border-color: #0d9488; background: #f0fdfa; }
.pbr-pill.active { background: #0d9488; border-color: #0d9488; color: #fff; }

/* ── Color Swatches ───────────────────────────────────────────────────── */
.pbr-colors { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }

/* Base swatch button — no background, no border, just a flex container */
.pbr-swatch {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
}

/* The colored circle */
.pbr-swatch-circle {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-sizing: border-box;
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.pbr-swatch:hover .pbr-swatch-circle { transform: scale(1.1); }
.pbr-swatch.active .pbr-swatch-circle {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0d9488;
  transform: scale(1.1);
}

/* ── HOVER MODE: name as CSS tooltip, span hidden ─────────────────────── */
.pbr-colors--hover .pbr-swatch-name {
  display: none;
}
.pbr-colors--hover .pbr-swatch::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}
.pbr-colors--hover .pbr-swatch:hover::after { opacity: 1; }

/* ── ALWAYS MODE: name always visible below the circle ────────────────── */
.pbr-colors--always { gap: 14px 16px; }
.pbr-colors--always .pbr-swatch-name {
  display: block;
  font-size: 11px;
  color: #374151;
  text-align: center;
  line-height: 1.2;
  max-width: 56px;
  word-break: break-word;
}

/* Custom color picker */
.pbr-custom-color {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem; color: #6b7280;
}
.pbr-custom-color input[type="color"] {
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  cursor: pointer; padding: 0; background: none;
}

.pbr-dropzone {
  border: 2px dashed #e5e7eb;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: #f9fafb;
}
.pbr-dropzone:hover, .pbr-dropzone.dragover {
  border-color: #0d9488; background: #f0fdfa;
}
.pbr-dropzone-inner svg { color: #d1d5db; margin-bottom: 8px; }
.pbr-dropzone-inner p { margin: 0 0 4px; color: #6b7280; font-size: 0.9rem; }
.pbr-dropzone-inner span { color: #0d9488; font-weight: 500; }
.pbr-dropzone-inner small { color: #9ca3af; font-size: 0.75rem; }
.pbr-file-list { margin-top: 12px; }
.pbr-file-item {
  display: flex; align-items: center; justify-content: space-between;
  background: #f3f4f6; padding: 8px 12px; border-radius: 8px;
  font-size: 0.85rem; margin-bottom: 6px;
}

.pbr-budget { position: relative; }
.pbr-budget span {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: #9ca3af; font-size: 0.9rem;
}
.pbr-budget .pbr-input { padding-left: 52px; }

.pbr-divider { height: 1px; background: #e5e7eb; margin: 28px 0 20px; }
.pbr-section-title { font-size: 0.9rem; font-weight: 500; color: #6b7280; margin: 0 0 16px; }

.pbr-submit {
  width: 100%;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.pbr-submit:hover { background: #1f2937; }
.pbr-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.pbr-footer-note {
  text-align: center; font-size: 0.875rem; color: #9ca3af; margin: 20px 0 0;
}
.pbr-footer-note a { color: #0d9488; text-decoration: underline; }

.pbr-success { text-align: center; padding: 40px 20px; }
.pbr-success-icon {
  width: 64px; height: 64px;
  background: #d1fae5; color: #059669;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 20px; font-weight: 700;
}
.pbr-success h3 { margin: 0 0 8px; font-size: 1.5rem; }
.pbr-success p { color: #6b7280; margin: 4px 0; }

/* My Requests */
.pbr-btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  background: #0d9488; color: #fff;
  padding: 10px 18px; border-radius: 10px;
  font-size: 0.9rem; font-weight: 500;
  text-decoration: none; transition: background 0.15s;
}
.pbr-btn-secondary:hover { background: #0f766e; color: #fff; }

.pbr-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 28px;
}
@media (max-width: 640px) { .pbr-stats { grid-template-columns: repeat(2, 1fr); } }
.pbr-stat {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: 16px;
}
.pbr-stat-label {
  display: block; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: #9ca3af; margin-bottom: 4px;
}
.pbr-stat-value { font-size: 1.5rem; font-weight: 700; color: #111827; }
.pbr-stat-value.amber { color: #d97706; }
.pbr-stat-value.blue  { color: #2563eb; }
.pbr-stat-value.green { color: #059669; }

.pbr-requests-list { display: flex; flex-direction: column; gap: 16px; }
.pbr-request-card {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 14px; padding: 20px;
  transition: box-shadow 0.15s;
}
.pbr-request-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.pbr-request-top {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 16px; align-items: flex-start;
}
.pbr-request-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.pbr-rid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem; font-weight: 600; color: #374151;
}
.pbr-status {
  font-size: 0.75rem; font-weight: 500;
  padding: 3px 10px; border-radius: 9999px;
}
.status-quote-pending  { background: #fef3c7; color: #92400e; }
.status-quote-sent     { background: #ede9fe; color: #5b21b6; }
.status-confirmed      { background: #e0e7ff; color: #3730a3; }
.status-in-production  { background: #dbeafe; color: #1e40af; }
.status-shipped        { background: #d1fae5; color: #065f46; }
.status-completed      { background: #a7f3d0; color: #064e3b; }
.status-archived       { background: #f3f4f6; color: #4b5563; }
.status-cancelled      { background: #fee2e2; color: #991b1b; }

.pbr-unread-badge {
  background: #ef4444; color: #fff;
  font-size: 0.7rem; font-weight: 600;
  padding: 2px 8px; border-radius: 9999px;
}

.pbr-request-product { font-weight: 600; font-size: 1.05rem; color: #111827; }
.pbr-request-sub { font-size: 0.85rem; color: #6b7280; margin-top: 2px; }
.pbr-request-right { display: flex; align-items: center; gap: 16px; }
.pbr-price { text-align: right; }
.pbr-price-label { display: block; font-size: 0.7rem; color: #9ca3af; }
.pbr-price-value { font-weight: 600; font-size: 1rem; }
.pbr-view-btn {
  background: #f3f4f6; border: none;
  padding: 8px 16px; border-radius: 8px;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: background 0.15s; color: #374151;
}
.pbr-view-btn:hover { background: #e5e7eb; }

/* Timeline */
.pbr-timeline {
  display: flex; align-items: center;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid #f3f4f6; gap: 0;
}
.pbr-timeline-step { display: flex; align-items: center; flex: 1; position: relative; }
.pbr-timeline-step:first-child { flex: 0 0 auto; }
.pbr-timeline-line { flex: 1; height: 2px; background: #e5e7eb; margin-right: 4px; }
.pbr-timeline-step.done .pbr-timeline-line { background: #0d9488; }
.pbr-timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #e5e7eb; flex-shrink: 0;
}
.pbr-timeline-step.done .pbr-timeline-dot { background: #0d9488; }
.pbr-timeline-step span {
  font-size: 0.7rem; color: #9ca3af;
  margin-left: 6px; white-space: nowrap;
}
.pbr-timeline-step.done span { color: #0d9488; font-weight: 500; }

.pbr-empty, .pbr-notice { text-align: center; padding: 48px 24px; }
.pbr-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.pbr-empty h3 { margin: 0 0 6px; font-size: 1.25rem; }
.pbr-empty p { color: #6b7280; margin: 0; }

/* Modal + Chat */
.pbr-modal {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.pbr-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
}
.pbr-modal-content {
  position: relative; background: #fff;
  border-radius: 16px; max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.pbr-modal-wide { max-width: 860px; }
.pbr-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.pbr-modal-header h3 { margin: 0; font-size: 1.1rem; }
.pbr-modal-close {
  background: none; border: none; font-size: 1.6rem;
  color: #9ca3af; cursor: pointer; line-height: 1;
}
.pbr-modal-body { padding: 0; }
.pbr-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}
@media (max-width: 700px) {
  .pbr-modal-grid { grid-template-columns: 1fr; }
  .pbr-modal-chat { border-top: 1px solid #e5e7eb; }
}

.pbr-modal-details { padding: 20px; border-right: 1px solid #f1f5f9; }
.pbr-modal-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; font-size: 0.9rem;
  border-bottom: 1px solid #f3f4f6;
}
.pbr-modal-row:last-child { border-bottom: none; }
.pbr-modal-label { color: #6b7280; }
.pbr-modal-value { font-weight: 500; text-align: right; max-width: 60%; }
.pbr-modal-desc { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.pbr-modal-desc p {
  background: #f9fafb; padding: 12px; border-radius: 8px;
  font-size: 0.9rem; margin: 6px 0 0; color: #374151;
  white-space: pre-wrap;
}

/* Chat panel */
.pbr-modal-chat {
  display: flex; flex-direction: column;
  background: #f8fafc;
}
.pbr-chat-header {
  padding: 12px 16px; font-weight: 600; font-size: 0.9rem;
  border-bottom: 1px solid #e2e8f0; background: #fff;
}
.pbr-chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 260px; max-height: 340px;
}
.pbr-chat-bubble {
  max-width: 85%; padding: 10px 14px;
  border-radius: 14px; font-size: 0.9rem; line-height: 1.45;
}
.pbr-chat-bubble.admin {
  align-self: flex-start;
  background: #e2e8f0; color: #1e293b;
  border-bottom-left-radius: 4px;
}
.pbr-chat-bubble.customer {
  align-self: flex-end;
  background: #0d9488; color: #fff;
  border-bottom-right-radius: 4px;
}
.pbr-chat-meta {
  font-size: 0.7rem; opacity: 0.75; margin-bottom: 3px;
}
.pbr-chat-input {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid #e2e8f0; background: #fff;
}
.pbr-chat-input textarea {
  flex: 1; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 10px 12px; font-size: 0.9rem; resize: none;
  font-family: inherit;
}
.pbr-chat-input textarea:focus {
  outline: none; border-color: #0d9488;
}
.pbr-chat-send {
  background: #0d9488; color: #fff; border: none;
  border-radius: 10px; padding: 0 18px;
  font-weight: 500; cursor: pointer; transition: background 0.15s;
}
.pbr-chat-send:hover { background: #0f766e; }
.pbr-chat-send:disabled { opacity: 0.6; cursor: not-allowed; }

.pbr-chat-empty {
  text-align: center; color: #94a3b8; margin: auto; font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 480px) {
  .pbr-wrapper { padding: 24px 16px 60px; }
  .pbr-card { padding: 20px; }
  .pbr-title { font-size: 1.75rem; }
  .pbr-request-right { width: 100%; justify-content: space-between; }
}
