/* ExpoMarketing Upload Widget — Namespaced styles */

/*
 * Scoped reset: neutralize BigCommerce / host-page styles
 * so the widget renders identically everywhere.
 */
.expo-upload,
.expo-upload *,
.expo-upload *::before,
.expo-upload *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  text-decoration: none;
  vertical-align: baseline;
  -webkit-text-size-adjust: 100%;
}

.expo-upload {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  font-weight: 400;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  color: #1a1a1a;
  line-height: 1.5;
  background: transparent;
  text-align: left;
  letter-spacing: normal;
  word-spacing: normal;
}

/* Title */
.expo-upload-title {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 700;
}

/* Column headings */
.expo-upload-col__heading {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

/* ── Fields grid ───────────────────────────────────────────────── */
.expo-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin-bottom: 24px;
}

.expo-upload-field--wide {
  grid-column: 1 / -1;
}

.expo-upload-radio-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* ── File section (full width) ─────────────────────────────────── */
.expo-upload-file-section {
  margin-bottom: 24px;
}

/* ── Element resets for common BC theme overrides ──────────────── */
.expo-upload h2,
.expo-upload h3 {
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.expo-upload form {
  margin: 0;
  padding: 0;
}

.expo-upload input[type="text"],
.expo-upload input[type="email"],
.expo-upload input[type="tel"],
.expo-upload textarea {
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
  width: 100%;
  height: auto;
  min-height: 0;
  max-width: none;
  box-shadow: none;
  line-height: 1.5;
}

.expo-upload button {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
}

.expo-upload ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.expo-upload li {
  list-style: none;
}

.expo-upload p {
  margin: 0;
}

/* ── Form fields ───────────────────────────────────────────────── */
.expo-upload-form {
  display: flex;
  flex-direction: column;
}

.expo-upload-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.expo-upload-label {
  font-size: 14px;
  font-weight: 600;
}

.expo-upload-input {
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
  width: 100%;
  transition: border-color 0.15s;
}

.expo-upload-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  padding: 4px 0;
}

.expo-upload-radio input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

.expo-upload-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.expo-upload-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ── Buttons (use .expo-upload prefix for specificity over button reset) */
.expo-upload .expo-upload-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.expo-upload .expo-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.expo-upload .expo-upload-btn--primary {
  background: #2563eb;
  color: #fff;
}

.expo-upload .expo-upload-btn--primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.expo-upload .expo-upload-btn--danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.expo-upload .expo-upload-btn--danger:hover {
  background: #fee2e2;
}

.expo-upload .expo-upload-submit {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
}

/* ── Drop Zone ─────────────────────────────────────────────────── */
.expo-upload-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.expo-upload-dropzone:hover,
.expo-upload-dropzone--active {
  border-color: #2563eb;
  background: #eff6ff;
}

.expo-upload-dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
  overflow: hidden;
}

.expo-upload-dropzone__icon {
  font-size: 36px;
  margin-bottom: 6px;
}

.expo-upload-dropzone__text {
  font-size: 15px;
  margin: 0 0 6px;
  color: #374151;
}

.expo-upload-dropzone__hint {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
}

/* ── File List ─────────────────────────────────────────────────── */
.expo-upload-filelist {
  margin-top: 12px;
}

.expo-upload-filelist__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 6px;
}

.expo-upload-filelist__name {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expo-upload-filelist__size {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.expo-upload .expo-upload-filelist__remove {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.expo-upload .expo-upload-filelist__remove:hover {
  background: #fef2f2;
}

.expo-upload-filelist__total {
  padding: 6px 10px;
  font-size: 13px;
  color: #6b7280;
}

/* ── Progress (uploading view) ─────────────────────────────────── */
.expo-upload-uploading {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.expo-upload-progress__label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}

.expo-upload-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.expo-upload-bar__fill {
  height: 100%;
  background: #2563eb;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.expo-upload-progress__files {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.expo-upload-progress__file {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.expo-upload-progress__file--done {
  border-color: #86efac;
  background: #f0fdf4;
}

.expo-upload-progress__file--error {
  border-color: #fecaca;
  background: #fef2f2;
}

.expo-upload-progress__file-info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}

.expo-upload-progress__file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.expo-upload-progress__file-status {
  margin-left: 12px;
  white-space: nowrap;
  color: #6b7280;
}

.expo-upload-progress__file--done .expo-upload-progress__file-status {
  color: #065f46;
  font-weight: 600;
}

.expo-upload-progress__file--error .expo-upload-progress__file-status {
  color: #dc2626;
}

/* ── Success ───────────────────────────────────────────────────── */
.expo-upload-success {
  text-align: center;
  padding: 32px 0;
}

.expo-upload-success__icon {
  font-size: 48px;
  color: #16a34a;
  margin-bottom: 12px;
}

.expo-upload-success h3 {
  font-size: 22px;
  margin: 0 0 8px;
}

.expo-upload-success p {
  color: #6b7280;
  margin: 0 0 20px;
}

.expo-upload-success__files {
  text-align: left;
  max-width: 400px;
  margin: 0 auto 24px;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 8px;
  list-style: none;
}

.expo-upload-success__files li {
  padding: 4px 0;
  font-size: 14px;
  color: #374151;
}

/* ── Errors ────────────────────────────────────────────────────── */
.expo-upload-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.expo-upload-errors__item {
  font-size: 14px;
  color: #dc2626;
  padding: 2px 0;
}

/* ── Responsive: stack grid on narrow screens ──────────────────── */
@media (max-width: 640px) {
  .expo-upload {
    padding: 16px;
  }
  .expo-upload-grid {
    grid-template-columns: 1fr;
  }
  .expo-upload-radio-row {
    flex-direction: column;
    gap: 4px;
  }
  .expo-upload-dropzone {
    padding: 24px 16px;
  }
}
