/* ============================================
   NATUR ATHLETICS — RETURNS PORTAL STYLES
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #070707;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e6e6e6;
  --gray-400: #a0a0a0;
  --gray-600: #6b6b6b;
  --gray-800: #3b3b3b;
  --accent: #070707;
  --error: #c0392b;
  --success: #1a7a4a;
  --border: #e6e6e6;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s ease;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--black);
  text-decoration: underline;
}

a:hover {
  opacity: 0.7;
}

/* ============================================
   HEADER
   ============================================ */

.portal-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo {
  height: 36px;
  width: auto;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.portal-main {
  flex: 1;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 16px 60px;
}

/* ============================================
   STEP INDICATOR
   ============================================ */

.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  gap: 0;
}

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

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gray-300, #d0d0d0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  background: var(--white);
  transition: var(--transition);
}

.step-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-400);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: var(--transition);
}

.step.active .step-number {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.step.active .step-label {
  color: var(--black);
  font-weight: 600;
}

.step.completed .step-number {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.step.completed .step-label {
  color: var(--gray-600);
}

.step-divider {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  min-width: 24px;
  max-width: 60px;
  margin-bottom: 18px;
  transition: background var(--transition);
}

.step-divider.completed {
  background: var(--black);
}

/* ============================================
   STEP PANELS
   ============================================ */

.step-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.step-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 40px;
  box-shadow: var(--shadow);
}

.panel-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--black);
}

.panel-subtitle {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--black);
  letter-spacing: 0.01em;
}

.optional {
  font-weight: 400;
  color: var(--gray-400);
}

.field-hint {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 8px;
  line-height: 1.5;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(7, 7, 7, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b6b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ============================================
   RESOLUTION OPTIONS
   ============================================ */

.resolution-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.resolution-card {
  cursor: pointer;
  display: block;
}

.resolution-card input[type="radio"] {
  display: none;
}

.card-content {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.resolution-card:hover .card-content {
  border-color: var(--gray-400);
}

.resolution-card input:checked + .card-content {
  border-color: var(--black);
  box-shadow: 0 0 0 2px var(--black);
  background: var(--gray-100);
}

.card-icon {
  font-size: 20px;
  line-height: 1;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  display: block;
}

.card-desc {
  font-size: 11px;
  color: var(--gray-600);
  display: block;
  line-height: 1.4;
}

/* ============================================
   FILE UPLOAD
   ============================================ */

.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.file-upload-area:hover {
  border-color: var(--gray-400);
  background: var(--gray-100);
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-600);
  font-size: 13px;
  pointer-events: none;
}

.upload-placeholder svg {
  color: var(--gray-400);
}

.photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.photo-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn-primary:hover:not(:disabled) {
  background: var(--gray-800);
  border-color: var(--gray-800);
  color: var(--white);
  text-decoration: none;
  opacity: 1;
}

.btn-secondary {
  background: var(--white);
  color: var(--black);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--gray-400);
  background: var(--gray-100);
  text-decoration: none;
  opacity: 1;
}

.btn-full {
  width: 100%;
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-secondary .btn-loader {
  border-color: rgba(0,0,0,0.2);
  border-top-color: var(--black);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.step-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  justify-content: flex-end;
}

.step-actions .btn-primary {
  min-width: 140px;
}

/* ============================================
   ERROR STATES
   ============================================ */

.form-error {
  background: #fdf0ef;
  border: 1px solid #e8b4b0;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--error);
  margin-bottom: 16px;
  line-height: 1.5;
}

.form-error.hidden,
.hidden {
  display: none !important;
}

input.error,
select.error,
textarea.error {
  border-color: var(--error);
}

/* ============================================
   ORDER SUMMARY
   ============================================ */

.order-summary {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--gray-600);
}

.order-summary strong {
  color: var(--black);
}

/* ============================================
   ITEMS LIST
   ============================================ */

.items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.item-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.item-card:hover {
  border-color: var(--gray-400);
}

.item-card.selected {
  border-color: var(--black);
  background: var(--gray-100);
  box-shadow: 0 0 0 1px var(--black);
}

.item-card.ineligible {
  opacity: 0.5;
  cursor: not-allowed;
}

.item-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.item-card.selected .item-checkbox {
  background: var(--black);
  border-color: var(--black);
}

.item-card.selected .item-checkbox::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

.item-image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--gray-100);
}

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

.item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-variant {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.item-price {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
}

.item-ineligible-reason {
  font-size: 11px;
  color: var(--error);
  margin-top: 2px;
}

/* ============================================
   SELECTED ITEMS SUMMARY
   ============================================ */

.selected-items-summary {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 24px;
}

.selected-items-summary h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600);
  margin-bottom: 10px;
}

.summary-item {
  font-size: 13px;
  color: var(--black);
  padding: 4px 0;
  display: flex;
  justify-content: space-between;
}

/* ============================================
   REVIEW BLOCK
   ============================================ */

.review-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.review-row {
  display: flex;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 16px;
}

.review-row:last-child {
  border-bottom: none;
}

.review-label {
  color: var(--gray-600);
  font-weight: 500;
  min-width: 120px;
  flex-shrink: 0;
}

.review-value {
  color: var(--black);
  font-weight: 500;
  flex: 1;
}

/* ============================================
   RESOLUTION FIXED BOX
   ============================================ */

.resolution-info-box {
  margin-top: 4px;
}

.resolution-fixed {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  font-size: 13px;
}

.resolution-fixed.refund {
  background: #f0f7ff;
  border-color: #b3d4f7;
}

.resolution-fixed.warranty {
  background: #f0faf4;
  border-color: #a8ddb8;
}

.resolution-fixed svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--gray-600);
}

.resolution-fixed div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resolution-fixed strong {
  font-weight: 600;
  color: var(--black);
  display: block;
}

.resolution-fixed span {
  color: var(--gray-600);
  line-height: 1.5;
}

/* Item eligibility badge */
.item-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  margin-top: 4px;
}

.warranty-badge {
  background: #fdf3e3;
  color: #9a6700;
  border: 1px solid #f5d79e;
}

.no-items {
  font-size: 14px;
  color: var(--gray-600);
  text-align: center;
  padding: 24px 0;
}

/* ============================================
   RETURN POLICY NOTE
   ============================================ */

.return-policy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 24px;
}

.return-policy-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.return-policy-note strong {
  color: var(--black);
}

/* ============================================
   SUCCESS PANEL
   ============================================ */

.success-panel {
  text-align: center;
  padding: 60px 40px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--white);
}

.success-details {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 16px;
  margin: 20px 0 32px;
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */

.portal-footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 12px;
  color: var(--gray-600);
  background: var(--white);
}

.portal-footer a {
  color: var(--gray-600);
}

/* ============================================
   HELP TEXT
   ============================================ */

.help-text {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-600);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
  .panel-inner {
    padding: 28px 20px;
  }

  .resolution-options {
    grid-template-columns: 1fr;
  }

  .step-label {
    display: none;
  }

  .step-divider {
    min-width: 16px;
  }

  .step-actions {
    flex-direction: column-reverse;
  }

  .step-actions .btn {
    width: 100%;
  }

  .portal-footer {
    flex-direction: column;
    gap: 8px;
  }
}
