/* Order View Styles - BD Fashion */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

/* Navigation Styles */
.nav-link {
  color: var(--gray-700);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

/* Profile dropdown styles */
.profile-btn {
  font-size: 1.25rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 9999px;
  padding: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.profile-btn:hover {
  background: var(--gray-200);
  transform: translateY(-1px);
}

.dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  min-width: 170px;
  z-index: 20;
}

.dropdown a {
  display: block;
  padding: 0.85rem 1rem;
  color: var(--gray-900);
  text-decoration: none;
  transition: background 0.2s ease;
}

.dropdown a:hover {
  background: var(--gray-50);
}

.hidden {
  display: none;
}

/* Page Header Styles */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 0.75rem;
}

.page-subtitle {
  font-size: 1.125rem;
  color: #555;
  max-width: 42rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
  font-weight: 500;
}

.page-features {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
}

.feature-dot {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .page-header {
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
  }

  .page-title {
    font-size: 1.875rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .page-features {
    gap: 1rem;
  }
}

/* Order Card Styles */
.order-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  overflow: hidden;
  margin-bottom: 2rem;
}

.order-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15), 0 20px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(-4px);
}

/* Order Header */
.order-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1.5rem;
}

.order-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.order-meta {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Status Badges */
.status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pending {
  background-color: #fef3c7;
  color: var(--warning);
}

.status-paid {
  background-color: #54cc3c;
  color: #000000;
}

.status-processing {
  background-color: #ede9fe;
  color: #7c3aed;
}

.status-shipped {
  background-color: #fed7aa;
  color: #ea580c;
}

.status-delivered {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-cancelled {
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.status-unpaid {
  background-color: #fed7aa;
  color: #ea580c;
}

/* Order Content */
.order-content {
  padding: 1.25rem;
}

/* Items Section */
.items-section {
  margin-bottom: 1.25rem;
}

.items-header {
  font-size: 1.125rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  width: fit-content;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background-color: var(--gray-50);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.order-item:last-child {
  margin-bottom: 0;
}

.item-image {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 0.375rem;
  background-color: var(--gray-200);
}

.item-details {
  flex: 1;
}

.item-title {
  font-weight: 700;
  color: #000;
  margin-bottom: 0.25rem;
}

.item-meta {
  font-size: 0.875rem;
  color: #555;
}

.item-price {
  font-weight: 700;
  color: var(--success);
  font-size: 1rem;
}

/* Summary Section */
.summary-section {
  background-color: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.summary-row:not(:last-child) {
  border-bottom: 1px solid var(--gray-100);
}

.summary-label {
  color: #000;
  font-weight: 600;
}

.summary-value {
  font-weight: 700;
  color: #000;
}

.summary-total {
  font-size: 1.125rem;
  font-weight: 800;
  color: #000;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--gray-200);
  background-color: white;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin: 0.5rem -1.25rem -1.25rem -1.25rem;
}

.summary-total .summary-value {
  color: #000;
  font-weight: 900;
}

.summary-total .summary-label {
  color: #111827;
  font-weight: 700;
}

/* Optimized Shipping Section Styles */
.shipping-section {
  background-color: #ffffff;
  border: 1px solid #e5e7eb; /* Gray-200 */
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); /* Deep soft shadow */
}

.shipping-header {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e40af; /* primary-dark */
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 0.75rem;
}

.shipping-header svg {
  color: #3b82f6; /* primary */
}

.shipping-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shipping-name {
  font-weight: 800;
  color: #111827;
  font-size: 1.05rem;
}

.shipping-address-text {
  color: #4b5563; /* Gray-600 */
  line-height: 1.6;
  white-space: pre-wrap; /* CRITICAL: Preserves line breaks from the checkout form */
}

.shipping-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #374151;
  margin-top: 0.25rem;
}

.shipping-contact svg {
  color: #3b82f6;
  flex-shrink: 0;
}


/* Payment Section */
.payment-section {
  background-color: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-header {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.payment-details {
  font-size: 0.875rem;
  color: #000;
  line-height: 1.5;
}

.payment-details span,
.payment-details div {
  color: #111827;
}

.payment-extra-details {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.payment-extra-details span {
  color: #000 !important;
}

.payment-extra-details div {
  color: #111827 !important;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  flex-wrap: wrap;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background-color: var(--gray-100);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  border: 1px solid var(--gray-300);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--danger);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.4);
}

.btn-remove {
  background-color: #7c2d12;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #7c2d12;
  box-shadow: 0 2px 8px rgba(124, 45, 18, 0.25);
}

.btn-remove:hover {
  background-color: #5a1f0d;
  border-color: #5a1f0d;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(124, 45, 18, 0.4);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  border-radius: 1rem;
  margin: 2rem 0;
  border: 1px solid var(--gray-200);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.empty-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.empty-title {
  font-size: 2rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 0.75rem;
}

.empty-description {
  color: #555;
  margin-bottom: 2.5rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 500;
}

.empty-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.empty-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.empty-note {
  font-size: 0.875rem;
  color: #888;
  font-weight: 600;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  border-radius: 1rem;
  margin: 2rem 0;
  border: 1px solid var(--gray-200);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
  display: inline-block;
  width: 4rem;
  height: 4rem;
  border: 4px solid var(--gray-200);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1.5rem;
}

.loading-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0.5rem;
}

.loading-subtitle {
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .order-card {
    margin: 0 -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .order-header {
    padding: 1rem;
  }

  .order-content {
    padding: 1rem;
  }

  .order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .item-image {
    width: 3rem;
    height: 3rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    text-align: center;
    justify-content: center;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  .order-card {
    background: var(--gray-800);
    border-color: var(--gray-700);
  }

  .order-title {
    color: var(--gray-50);
  }

  .order-meta {
    color: var(--gray-400);
  }

  .items-header,
  .shipping-header,
  .payment-header {
    color: var(--gray-50);
  }

  .item-title {
    color: var(--gray-50);
  }

  .item-meta {
    color: var(--gray-400);
  }

  .summary-section,
  .order-item {
    background-color: var(--gray-900);
    border-color: var(--gray-50);
  }

  .summary-label {
    color: var(--gray-400);
  }

  .summary-value {
    color: var(--gray-400);
  }

  .shipping-details,
  .payment-details {
    color: var(--gray-400);
  }
}

/* Animation for order cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Override all gray text colors in shipping section */
.shipping-section,
.shipping-section * {
  color: #111827 !important;
}

.shipping-section .text-gray-900,
.shipping-section .text-gray-700,
.shipping-section .text-gray-600,
.shipping-section .text-gray-500,
.shipping-section .text-gray-400 {
  color: #111827 !important;
}

.shipping-section svg {
  color: inherit;
}

/* Override all gray text colors in payment section */
.payment-section,
.payment-section * {
  color: #111827 !important;
}

.payment-section .text-gray-900,
.payment-section .text-gray-700,
.payment-section .text-gray-600,
.payment-section .text-gray-500,
.payment-section .text-gray-400 {
  color: #111827 !important;
}

.payment-section .text-sm {
  color: #111827 !important;
}

.payment-section svg {
  color: inherit;
}

/* Keep headers their theme colors */
.shipping-header {
  color: var(--primary-dark) !important;
}

.payment-header {
  color: var(--success) !important;
}

/* Ensure text in transaction ID and payment ID boxes is visible */
.shipping-section .bg-gray-50,
.payment-section .bg-gray-50 {
  background-color: white;
  border: 1px solid var(--gray-200);
}

.shipping-section .bg-gray-50 *,
.payment-section .bg-gray-50 * {
  color: #111827 !important;
}

/* Preserve special badge colors */
.payment-section .bg-green-100 {
  background-color: rgba(16, 185, 129, 0.1) !important;
  color: var(--success) !important;
}

.payment-section .text-green-800 {
  color: var(--success) !important;
}

.tracking-section {
  background-color: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.tracking-header {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.tracking-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tracking-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background-color: white;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  padding: 0.9rem 0.75rem;
  text-align: center;
  transition: all 0.2s ease;
}

.tracking-step.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
}

.tracking-step.completed {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
}

.step-icon {
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background-color: rgba(59, 130, 246, 0.1);
  font-size: 1rem;
}

.tracking-step.completed .step-icon {
  background-color: rgba(16, 185, 129, 0.1);
}

.step-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #000;
}

.tracking-subtext {
  font-size: 0.85rem;
  color: #555;
  text-align: center;
  font-weight: 500;
}

@media (max-width: 768px) {
  .tracking-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.order-card {
  animation: fadeInUp 0.5s ease-out;
}

.order-card:nth-child(1) { animation-delay: 0.1s; }
.order-card:nth-child(2) { animation-delay: 0.2s; }
.order-card:nth-child(3) { animation-delay: 0.3s; }
.order-card:nth-child(4) { animation-delay: 0.4s; }
.order-card:nth-child(5) { animation-delay: 0.5s; }

/* Footer Styles */
footer {
  background-color: #111827 !important; /* Changed from var(--gray-100) to dark from image */
  color: #f9fafb !important; /* Changed from var(--secondary) to light from image */
}

footer * {
  color: #f9fafb !important; /* Changed from var(--secondary) to light from image */
}

footer a {
  color: #d1d5db !important; /* Changed from var(--gray-600) to gray from image */
}

footer a:hover {
  color: white !important; /* Changed from var(--primary) to white from image */
}

footer .border-t {
  border-color: #374151 !important; /* Changed from var(--gray-300) to dark border from image */
}
