/*
 * WWC Warranty Claims - Frontend UI (Pro)
 * Diseño moderno tipo Amazon (pasos + tarjetas) sin depender del tema.
 */

.wwc-wizard {
  --wwc-accent: #ff9900;
  --wwc-accent-2: #232f3e;
  --wwc-bg: #f6f7fb;
  --wwc-card: #fff;
  --wwc-border: rgba(0,0,0,.08);
  --wwc-text: #111827;
  --wwc-muted: rgba(17,24,39,.65);
  --wwc-radius: 16px;
  --wwc-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px rgba(17,24,39,.06);
}

.wwc-wizard * {
  box-sizing: border-box;
}

.wwc-muted {
  color: var(--wwc-muted);
}

/* Alert */
.wwc-alert {
  border: 1px solid var(--wwc-border);
  border-radius: var(--wwc-radius);
  padding: 14px 16px;
  background: #fff;
  box-shadow: var(--wwc-shadow);
  margin-bottom: 14px;
}

.wwc-alert__title {
  font-weight: 800;
  margin-bottom: 4px;
}

.wwc-alert__text {
  color: var(--wwc-muted);
}

/* Stepper */
.wwc-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.wwc-step {
  background: #fff;
  border: 1px solid var(--wwc-border);
  border-radius: 999px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.wwc-step__num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: var(--wwc-bg);
  border: 1px solid var(--wwc-border);
}

.wwc-step__label {
  font-weight: 700;
  font-size: 13px;
  color: var(--wwc-text);
}

.wwc-step.is-active {
  border-color: rgba(255,153,0,.45);
  box-shadow: 0 0 0 3px rgba(255,153,0,.14);
}

.wwc-step.is-active .wwc-step__num {
  background: rgba(255,153,0,.16);
  border-color: rgba(255,153,0,.35);
}

/* Layout */
.wwc-wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.wwc-wizard-aside {
  position: relative;
}

.wwc-wizard-aside .wwc-summary {
  position: sticky;
  top: 18px;
}

/* Cards */
.wwc-card {
  background: var(--wwc-card);
  border: 1px solid var(--wwc-border);
  border-radius: var(--wwc-radius);
  box-shadow: var(--wwc-shadow);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.wwc-h3 {
  margin: 0 0 8px;
  font-weight: 900;
}

.wwc-step-panel {
  margin-bottom: 10px;
}

/* Item cards */
.wwc-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0 14px;
}

.wwc-item-card {
  background: #fff;
  border: 1px solid var(--wwc-border);
  border-radius: var(--wwc-radius);
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.wwc-item-card.is-selected {
  border-color: rgba(255,153,0,.45);
  box-shadow: 0 0 0 3px rgba(255,153,0,.12);
}

.wwc-item-card__row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.wwc-item-left {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.wwc-item-check {
  width: 110px;
}

.wwc-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.wwc-item-media {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wwc-item-thumb img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--wwc-border);
}

.wwc-item-name {
  font-weight: 900;
  color: var(--wwc-text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 520px;
}

.wwc-item-meta {
  font-size: 12px;
  color: var(--wwc-muted);
  margin-top: 4px;
}

.wwc-item-right {
  text-align: right;
}

.wwc-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--wwc-border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.wwc-qty-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.wwc-qty-input {
  width: 64px;
  height: 38px;
  border: none;
  text-align: center;
  outline: none;
}

.wwc-qty-input:disabled {
  background: #f3f4f6;
  color: rgba(17,24,39,.5);
}

.wwc-qty-hint {
  font-size: 12px;
  margin-top: 6px;
}

.wwc-pill-mini {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--wwc-border);
  background: var(--wwc-bg);
  font-size: 12px;
  font-weight: 800;
}

.wwc-pill-mini--disabled {
  opacity: .65;
}

/* Detail cards */
.wwc-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.wwc-detail-card {
  background: #fff;
  border: 1px solid var(--wwc-border);
  border-radius: var(--wwc-radius);
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.wwc-detail-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.wwc-detail-name {
  font-weight: 900;
  line-height: 1.2;
}

.wwc-detail-meta {
  color: var(--wwc-muted);
  font-size: 12px;
  margin-top: 4px;
}

.wwc-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wwc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wwc-field__label {
  font-weight: 800;
}

.wwc-field select,
.wwc-field textarea,
.wwc-field input[type="file"],
.wwc-card select,
.wwc-card textarea,
.wwc-card input[type="file"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--wwc-border);
  padding: 10px 12px;
}

.wwc-field textarea {
  resize: vertical;
}

.wwc-field select:disabled,
.wwc-field textarea:disabled,
.wwc-field input[type="file"]:disabled {
  background: #f3f4f6;
}

/* Terms */
.wwc-terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 700;
}

/* Summary */
.wwc-summary__title {
  font-weight: 900;
  margin-bottom: 10px;
}

.wwc-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.wwc-summary__items {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wwc-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--wwc-bg);
  border: 1px solid var(--wwc-border);
}

.wwc-summary-item__name {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wwc-summary__hint {
  margin-top: 10px;
}

/* Nav buttons */
.wwc-step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Compatibility: hide "hidden" */
[hidden] {
  display: none !important;
}

/* Claim view / tracker (estilos base, retro-compatibles) */
.wwc-claim-wrapper { margin: 1.5em 0; }
.wwc-title { margin: 0 0 1em 0; font-weight: 900; }
.wwc-file-list { margin: 0.5em 0 0 1.2em; }
.wwc-timeline-entry {
  border: 1px solid var(--wwc-border);
  padding: 12px;
  margin: 10px 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.wwc-timeline-entry.wwc-admin { background: rgba(17,24,39,.02); }
.wwc-timeline-entry.wwc-customer { background: rgba(255,153,0,.05); }
.wwc-timeline-entry .wwc-timeline-header { display:flex; justify-content: space-between; gap: 10px; }
.wwc-claim-meta { list-style: disc; margin-left: 1.2em; }

/* Responsive */
@media (max-width: 980px) {
  .wwc-wizard-layout {
    grid-template-columns: 1fr;
  }
  .wwc-wizard-aside .wwc-summary {
    position: static;
  }
  .wwc-detail-fields {
    grid-template-columns: 1fr;
  }
  .wwc-item-check {
    width: auto;
  }
  .wwc-item-card__row {
    flex-direction: column;
    align-items: stretch;
  }
  .wwc-item-right {
    text-align: left;
  }
  .wwc-item-name {
    max-width: 100%;
  }
}
