/* ═══════════════════════════════════════════════════════════
   Cessie & Bette Designs – Customer Upload Widget
   ═══════════════════════════════════════════════════════════ */

:root {
  --cb-gold:         #c5a47e;
  --cb-gold-dark:    #a8845e;
  --cb-brown:        #3d2b1f;
  --cb-cream:        #faf7f2;
  --cb-cream-border: #e8ddd0;
  --cb-success:      #3a7d5a;
  --cb-error:        #c0392b;
  --cb-text:         #4a3728;
  --cb-muted:        #8c7464;
  --cb-radius:       12px;
  --cb-transition:   0.2s ease;
}

/* ── Container ──────────────────────────────────────────── */
.cb-uploader-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 600px;
  margin: 0 auto;
  color: var(--cb-text);
}

.cb-uploader-label {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--cb-brown);
}

.cb-uploader-description {
  font-size: 0.85rem;
  color: var(--cb-muted);
  margin: 0 0 16px;
}

/* ── Drop Zone ──────────────────────────────────────────── */
.cb-drop-zone {
  position: relative;
  border: 2px dashed var(--cb-cream-border);
  border-radius: var(--cb-radius);
  background: var(--cb-cream);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--cb-transition), background var(--cb-transition), box-shadow var(--cb-transition);
  outline: none;
}

.cb-drop-zone:hover,
.cb-drop-zone:focus-visible {
  border-color: var(--cb-gold);
  background: #fdf9f4;
  box-shadow: 0 0 0 4px rgba(197, 164, 126, 0.12);
}

.cb-drop-zone.cb-drag-over {
  border-color: var(--cb-gold-dark);
  background: #fdf5eb;
  box-shadow: 0 0 0 4px rgba(197, 164, 126, 0.2);
}

.cb-drop-inner {
  pointer-events: none;
}

.cb-upload-icon {
  width: 44px;
  height: 44px;
  color: var(--cb-gold);
  margin-bottom: 12px;
}

.cb-drop-text {
  display: block;
  font-size: 0.95rem;
  color: var(--cb-text);
  font-weight: 500;
}

.cb-browse-link {
  color: var(--cb-gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cb-drop-subtext {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--cb-muted);
  letter-spacing: 0.02em;
}

.cb-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ── Preview Area ───────────────────────────────────────── */
.cb-preview-area {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--cb-cream);
  border: 1px solid var(--cb-cream-border);
  border-radius: var(--cb-radius);
  margin-top: 12px;
}

.cb-preview-thumb-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--cb-cream-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cb-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cb-preview-file-icon {
  width: 40px;
  height: 40px;
  color: var(--cb-gold);
}

.cb-preview-file-icon svg {
  width: 100%;
  height: 100%;
}

.cb-preview-info {
  flex: 1;
  min-width: 0;
}

.cb-preview-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--cb-brown);
}

.cb-preview-size {
  display: block;
  font-size: 0.78rem;
  color: var(--cb-muted);
  margin-top: 2px;
}

.cb-preview-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────── */
.cb-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--cb-transition);
  line-height: 1.4;
}

.cb-btn-change {
  background: #fff;
  border-color: var(--cb-cream-border);
  color: var(--cb-text);
}

.cb-btn-change:hover {
  border-color: var(--cb-gold);
  color: var(--cb-gold-dark);
}

.cb-btn-remove {
  background: transparent;
  border-color: transparent;
  color: var(--cb-error);
  padding-left: 0;
}

.cb-btn-remove:hover {
  text-decoration: underline;
}

/* ── Progress ───────────────────────────────────────────── */
.cb-progress-wrap {
  margin-top: 14px;
}

.cb-progress-bar {
  background: var(--cb-cream-border);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}

.cb-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cb-gold), var(--cb-gold-dark));
  border-radius: 100px;
  transition: width 0.3s ease;
}

.cb-progress-label {
  font-size: 0.8rem;
  color: var(--cb-muted);
  display: block;
  margin-top: 6px;
}

/* ── Order Notes ────────────────────────────────────────── */
.cb-notes-wrap {
  margin-top: 18px;
}

.cb-notes-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cb-brown);
  margin-bottom: 6px;
}

.cb-notes-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  border: 1px solid var(--cb-cream-border);
  border-radius: 8px;
  background: var(--cb-cream);
  color: var(--cb-text);
  resize: vertical;
  transition: border-color var(--cb-transition), box-shadow var(--cb-transition);
}

.cb-notes-input:focus {
  outline: none;
  border-color: var(--cb-gold);
  box-shadow: 0 0 0 3px rgba(197, 164, 126, 0.15);
}

.cb-notes-input::placeholder {
  color: #b5a498;
}

/* ── Submit Button ──────────────────────────────────────── */
.cb-submit-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px 24px;
  background: var(--cb-gold);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--cb-transition), transform var(--cb-transition), box-shadow var(--cb-transition);
}

.cb-submit-btn:hover:not(:disabled) {
  background: var(--cb-gold-dark);
  box-shadow: 0 4px 16px rgba(197, 164, 126, 0.35);
  transform: translateY(-1px);
}

.cb-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Status Messages ────────────────────────────────────── */
.cb-status {
  margin-top: 14px;
  font-size: 0.88rem;
  border-radius: 8px;
  padding: 0;
  transition: all 0.3s ease;
}

.cb-status.cb-status-success {
  padding: 12px 16px;
  background: #f0faf4;
  border: 1px solid #a8d5b5;
  color: var(--cb-success);
}

.cb-status.cb-status-error {
  padding: 12px 16px;
  background: #fdf3f2;
  border: 1px solid #e8b4b0;
  color: var(--cb-error);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .cb-drop-zone { padding: 28px 16px; }
  .cb-preview-area { flex-direction: column; }
  .cb-preview-thumb-wrap { width: 100%; height: 140px; }
  .cb-preview-img { height: 140px; }
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
