/* pedido.css – Styles for the Order Tracking page */

/* Utility hidden class */
.hidden {
  display: none !important;
}

/* Container for the tracking section */
.order-section {
  padding: 8rem 0 4rem;
  background-color: var(--color-light);
  min-height: calc(100vh - 120px);
}

.order-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  color: var(--color-dark);
  text-align: center;
  margin-bottom: 0.5rem;
}

.order-desc {
  text-align: center;
  color: var(--color-dark);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.order-input-group {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.order-input {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--color-light-gray);
  border-radius: var(--radius-md);
  width: 280px;
  background: var(--color-white);
  color: var(--color-dark);
}

.order-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

/* Result container */
.order-result {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.order-number-display {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-dark);
  text-align: center;
}

.order-number-value {
  font-family: var(--font-title);
  color: var(--color-primary);
}

/* Header Row with Badge */
.order-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* Live Badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(76, 175, 80, 0.15);
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: #4caf50;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.live-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4caf50;
  border-radius: 50%;
  animation: pulseLive 1.5s infinite ease-in-out;
}

@keyframes pulseLive {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Progress bar */
.order-progress {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* Horizontal line behind circles */
.order-progress::before {
  content: '';
  position: absolute;
  top: 20px; /* align with circle center */
  left: 10%;
  right: 10%;
  height: 4px;
  background: var(--color-light-gray);
  z-index: 0;
}

.order-step {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 600;
  font-size: 1rem;
  border: 3px solid var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.step-circle.active {
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.2);
}

.step-circle.completed {
  background: #4caf50; /* green for completed */
}

.step-label {
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--color-dark);
  font-size: 0.95rem;
}

.step-date {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #777;
}

/* Spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(21, 101, 192, 0.1);
  border-left-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* Order Details Card */
.order-details-card {
  margin-top: 2.5rem;
  padding: 2rem;
  background-color: var(--color-light);
  border: 1px solid var(--color-light-gray);
  border-radius: var(--radius-md);
  color: var(--color-dark);
  text-align: left;
}

.order-details-card h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-light-gray);
  padding-bottom: 0.5rem;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .details-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--color-light-gray);
  padding-bottom: 0.5rem;
}

.detail-row span {
  color: rgba(26, 26, 26, 0.6);
}

.detail-row strong {
  color: var(--color-dark);
}

.details-subtitle {
  font-family: var(--font-title);
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-dark);
  border-bottom: 1px solid var(--color-light-gray);
  padding-bottom: 0.25rem;
}

.details-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.details-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: var(--color-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-light-gray);
}

.details-item-main {
  display: flex;
  flex-direction: column;
}

.item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-dark);
}

.item-variant {
  font-size: 0.8rem;
  color: rgba(26, 26, 26, 0.5);
}

.details-item-qty {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.details-item-qty span {
  font-size: 0.8rem;
  color: rgba(26, 26, 26, 0.5);
}

.details-item-qty strong {
  color: var(--color-primary);
  font-size: 0.95rem;
}

.details-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--color-light-gray);
}

.details-total-row span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-dark);
}

.details-total-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-title);
}

/* Not-found message & WhatsApp */
.order-not-found {
  text-align: center;
  font-size: 1.2rem;
  color: var(--color-dark);
  margin-top: 2rem;
}

.order-not-found i {
  color: var(--color-primary);
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.btn-whatsapp-share {
  background-color: #25d366;
  color: var(--color-white);
  margin-top: 1.5rem;
}

.btn-whatsapp-share:hover {
  background-color: #128c7e;
  color: var(--color-white);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .order-input-group {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
  }
  .order-input {
    width: 100%;
  }
  .order-progress::before {
    left: 5%;
    right: 5%;
  }
  .order-result {
    padding: 1.5rem 1rem;
  }
}

/* ── Bloco de Dados Bancários (pedido.html) ── */
.pedido-dados-bancarios {
  background: linear-gradient(135deg, rgba(21,101,192,0.04) 0%, rgba(21,101,192,0.07) 100%);
  border: 1px solid rgba(21,101,192,0.22);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.pdb-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pdb-header h4 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.pdb-row {
  display: flex;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--color-dark);
  margin-bottom: 0.45rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.pdb-row span {
  color: #666;
  min-width: 58px;
  flex-shrink: 0;
}

.pdb-iban {
  font-family: monospace;
  font-size: 0.9rem;
  background: rgba(21,101,192,0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.pdb-hint {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.pdb-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  padding: 0.45rem 0.9rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  font-family: var(--font-body);
}

.pdb-copy-btn:hover { background: #0d47a1; transform: translateY(-1px); }
.pdb-copy-btn.copiado { background: #27ae60; }

/* Upload form */
.pdb-upload-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(21,101,192,0.2);
}

.pdb-upload-label {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--color-dark);
}

.pdb-file-input {
  display: block;
  width: 100%;
  margin: 0.75rem 0;
  padding: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid var(--color-light-gray);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  cursor: pointer;
}

.pdb-error {
  color: #e74c3c;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
  min-height: 1em;
}

.pdb-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  font-family: var(--font-body);
}

.pdb-upload-btn:hover { background: #0d47a1; transform: translateY(-1px); }
.pdb-upload-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Comprovativo already received */
.pdb-comprovativo-ok {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: rgba(39,174,96,0.08);
  border: 1px solid rgba(39,174,96,0.25);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: #1a5e32;
  font-weight: 500;
}

/* ── Bloco de Pesquisa Manual do Pedido ── */
.pesquisa-pedido {
  max-width: 650px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.erro-pesquisa {
  color: #c0392b;
  background-color: #fdf2f2;
  border: 1px solid #f8d7da;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.92rem;
  margin: 1.25rem auto 0;
  max-width: 540px;
  text-align: center;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}


