﻿/* =============================================================
   Asana QuickDrop — Public stylesheet (Tailwind-inspired, vanilla CSS)
   ============================================================= */

/* ---- Scope ---- */
.aqd-public {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #111827;
  box-sizing: border-box;
}
.aqd-public *, .aqd-public *::before, .aqd-public *::after {
  box-sizing: inherit;
}

/* ---- Stepper ---- */
.aqd-stepper { margin-bottom: 1.75rem; }

.aqd-stepper-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.aqd-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.aqd-step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #9ca3af;
  transition: all 0.2s ease;
  position: relative;
}

.aqd-step-check {
  display: none;
  width: 15px;
  height: 15px;
}
.aqd-step-num { display: block; line-height: 1; }

.aqd-step.active .aqd-step-circle {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}
.aqd-step.done .aqd-step-circle {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}
.aqd-step.done .aqd-step-num { display: none; }
.aqd-step.done .aqd-step-check { display: block; }

.aqd-step-label {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.aqd-step.active .aqd-step-label { color: #2563eb; font-weight: 700; }
.aqd-step.done .aqd-step-label   { color: #16a34a; }

.aqd-step-line {
  flex: 1 1 auto;
  height: 2px;
  background: #e5e7eb;
  margin: 18px 4px 0; /* 18px = half circle height so line aligns mid-circle */
  min-width: 12px;
  transition: background 0.3s ease;
}
.aqd-step-line.done { background: #16a34a; }

@media (max-width: 480px) {
  .aqd-step-label { display: none; }
  .aqd-step-circle { width: 30px; height: 30px; font-size: 12px; }
  .aqd-step-check { width: 12px; height: 12px; }
  .aqd-step-line { margin-top: 14px; }
}

/* ---- Card ---- */
.aqd-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.07);
}
@media (max-width: 480px) {
  .aqd-card { padding: 20px 18px; border-radius: 16px; }
}

/* ---- Panel ---- */
.aqd-panel[hidden] { display: none; }

.aqd-panel-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #f3f4f6;
}
.aqd-panel-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
}
.aqd-panel-subtitle {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.aqd-panel-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1.5px solid #f3f4f6;
  flex-wrap: wrap;
}

/* ---- Fields ---- */
.aqd-fields { display: flex; flex-direction: column; gap: 18px; }

.aqd-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) {
  .aqd-field-row { grid-template-columns: 1fr; }
}

.aqd-field { display: flex; flex-direction: column; gap: 7px; }

.aqd-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: block;
}
.aqd-label-hint {
  font-weight: 400;
  color: #9ca3af;
  font-size: 12px;
}
.aqd-req { color: #ef4444; margin-left: 2px; }

.aqd-input,
.aqd-select,
.aqd-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.aqd-input::placeholder { color: #9ca3af; }
.aqd-input:focus,
.aqd-select:focus,
.aqd-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.aqd-input.is-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.aqd-select.is-invalid,
.aqd-textarea.is-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.aqd-textarea {
  min-height: 130px;
  resize: vertical;
}

.aqd-select-wrap { position: relative; }
.aqd-select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #6b7280;
  pointer-events: none;
}
.aqd-select { appearance: none; padding-right: 38px; cursor: pointer; }

/* ---- Buttons ---- */
.aqd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.aqd-btn:hover:not(:disabled) { background: #f9fafb; border-color: #d1d5db; }
.aqd-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.aqd-btn.primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}
.aqd-btn.primary:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}
.aqd-btn.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.aqd-btn.ghost {
  background: transparent;
  border-color: transparent;
  color: #6b7280;
  box-shadow: none;
}
.aqd-btn.ghost:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: transparent;
  color: #374151;
}

/* ---- Quantity picker ---- */
.aqd-qty-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px auto;
  max-width: 210px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #f9fafb;
}

.aqd-qty-btn {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  flex-shrink: 0;
}
.aqd-qty-btn:hover { background: #e5e7eb; }

.aqd-qty-input {
  flex: 1;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  color: #111827;
  padding: 0;
  width: 60px;
  -moz-appearance: textfield;
  font-family: inherit;
}
.aqd-qty-input:focus { outline: none; }
.aqd-qty-input::-webkit-outer-spin-button,
.aqd-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.aqd-qty-hint {
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 4px;
  font-style: italic;
}

/* ---- Upload groups ---- */
.aqd-groups { display: flex; flex-direction: column; gap: 16px; }

.aqd-group {
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.aqd-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.aqd-group-num {
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.aqd-task-name-row {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.aqd-checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}

.aqd-checkline input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.aqd-drop {
  padding: 22px 16px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
  border-top: 1.5px dashed #d1d5db;
  transition: background 0.15s;
}
.aqd-drop:hover,
.aqd-drop.is-over {
  background: #eef2ff;
  border-color: #818cf8;
}

.aqd-drop-icon {
  width: 34px;
  height: 34px;
  display: block;
  margin: 0 auto 8px;
  color: #94a3b8;
}

.aqd-drop p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}
.aqd-drop strong { color: #374151; }
.aqd-drop-link { color: #2563eb; text-decoration: underline; }

.aqd-file-list {
  padding: 6px 16px 10px;
  background: #fff;
  min-height: 36px;
}

.aqd-drop-empty {
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  font-style: italic;
  margin: 8px 0 4px;
}

.aqd-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f3f4f6;
}
.aqd-file:last-child { border-bottom: none; }

.aqd-file-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: #94a3b8;
}
.aqd-file-name {
  flex: 1 1 auto;
  font-size: 13px;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aqd-file-size {
  font-size: 12px;
  color: #9ca3af;
  flex-shrink: 0;
}
.aqd-file-remove {
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 5px;
  transition: color 0.1s, background 0.1s;
  flex-shrink: 0;
}
.aqd-file-remove:hover { color: #ef4444; background: #fef2f2; }

/* ---- Review cards ---- */
.aqd-review { display: flex; flex-direction: column; gap: 16px; }

.aqd-review-card {
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.aqd-review-card-header {
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.aqd-review-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  background: #e0e7ff;
  color: #3730a3;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.aqd-review-section {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
}
.aqd-review-section:last-child { border-bottom: none; }

.aqd-review-field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9ca3af;
  margin-bottom: 8px;
}

.aqd-review-file-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.aqd-review-file {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #374151;
}
.aqd-review-file-icon {
  width: 14px; height: 14px;
  flex-shrink: 0;
  color: #94a3b8;
}

/* ---- Project custom fields (step 2) ---- */
.aqd-custom-fields {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.aqd-custom-field-row { display: flex; flex-direction: column; gap: 6px; }

/* ---- Status / Progress ---- */
.aqd-status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  background: #f1f5f9;
  color: #1e293b;
}
.aqd-status[hidden] { display: none; }
.aqd-status.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.aqd-status.error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.aqd-progress {
  margin-top: 10px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}
.aqd-progress[hidden] { display: none; }
.aqd-progress-bar {
  height: 6px;
  width: 0%;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
  border-radius: 6px;
  transition: width 0.35s ease;
}

/* ---- Misc ---- */
.aqd-muted {
  color: #9ca3af;
  font-size: 13px;
  font-style: italic;
}