/*--------------------------------------------------------------
# Order Success Page Styles
--------------------------------------------------------------*/
.success-page {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent-color), transparent 95%) 0%,
    white 100%
  );
}

/* Success Animation */
.success-animation {
  text-align: center;
  padding: 40px 0;
}

.success-checkmark {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  position: relative;
}

.check-icon {
  width: 120px;
  height: 120px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid var(--accent-color);
  background-color: white;
  animation: scaleIn 0.6s ease-in-out;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.check-icon::before {
  content: "";
  position: absolute;
  top: 3px;
  left: -2px;
  width: 30px;
  transform-origin: 100% 50%;
  border-radius: 100px 0 0 100px;
}

.icon-line {
  height: 5px;
  background-color: var(--accent-color);
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.line-tip {
  top: 56px;
  left: 25px;
  width: 30px;
  transform: rotate(45deg);
  animation: tipInPlace 0.4s ease-in-out 0.4s forwards;
  opacity: 0;
}

.line-long {
  top: 50px;
  right: 15px;
  width: 60px;
  transform: rotate(-45deg);
  animation: longInPlace 0.5s ease-in-out 0.6s forwards;
  opacity: 0;
}

@keyframes tipInPlace {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 30px;
    opacity: 1;
  }
}

@keyframes longInPlace {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 60px;
    opacity: 1;
  }
}

.icon-circle {
  top: -4px;
  left: -4px;
  z-index: 10;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: absolute;
  box-sizing: content-box;
  border: 4px solid color-mix(in srgb, var(--accent-color), transparent 80%);
}

.icon-fix {
  top: 10px;
  width: 8px;
  height: 95px;
  left: 30px;
  z-index: 1;
  position: absolute;
  transform: rotate(-45deg);
  background-color: white;
}

/* Success Message */
.success-message {
  margin-top: 30px;
}

.success-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 15px;
  animation: fadeInUp 0.6s ease-in-out 0.8s both;
}

.success-subtitle {
  font-size: 1.3rem;
  color: var(--default-color);
  opacity: 0.8;
  animation: fadeInUp 0.6s ease-in-out 1s both;
}

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

/* Order Confirmation Card */
.order-confirmation-card {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.order-number h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--default-color);
  opacity: 0.8;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.order-id {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-color);
  margin: 0;
}

.order-date {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--default-color);
  opacity: 0.8;
}

.order-date i {
  font-size: 1.5rem;
  color: var(--accent-color);
}

.confirmation-divider {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--default-color), transparent 85%) 50%,
    transparent 100%
  );
  margin: 30px 0;
}

/* Customer & Delivery Info */
.customer-info h4,
.delivery-info h4,
.order-items h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--default-color);
  opacity: 0.7;
}

.info-item span {
  font-size: 1rem;
  color: var(--heading-color);
}

.delivery-address-box {
  background: var(--surface-color);
  padding: 20px;
  border-radius: 12px;
}

.address-text {
  line-height: 1.8;
  margin-bottom: 15px;
}

.delivery-estimate-box {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: white;
  border-radius: 10px;
  border-left: 4px solid var(--accent-color);
}

.delivery-estimate-box i {
  font-size: 2rem;
  color: var(--accent-color);
  flex-shrink: 0;
}

.delivery-estimate-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--heading-color);
}

.delivery-estimate-box p {
  margin: 0;
  color: var(--default-color);
  opacity: 0.8;
}

/* Order Items */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--surface-color);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.order-item:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 95%);
  transform: translateX(5px);
}

.item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  background: white;
  padding: 5px;
}

.item-details {
  flex: 1;
}

.item-details h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--heading-color);
}

.item-seller {
  font-size: 0.9rem;
  color: var(--default-color);
  opacity: 0.7;
  margin-bottom: 5px;
}

.item-seller i {
  color: var(--accent-color);
}

.item-quantity {
  font-size: 0.85rem;
  margin: 0;
}

.item-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--heading-color);
}

/* Order Summary Totals */
.order-summary-totals {
  background: var(--surface-color);
  padding: 25px;
  border-radius: 12px;
  margin-top: 20px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 1rem;
  color: var(--default-color);
  border-bottom: 1px solid
    color-mix(in srgb, var(--default-color), transparent 90%);
}

.summary-line:last-of-type {
  border-bottom: none;
}

.summary-line.discount span:last-child {
  color: #28a745;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  margin-top: 15px;
  border-top: 2px solid var(--accent-color);
}

.summary-total span:first-child {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading-color);
}

.total-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-color);
}

.payment-method-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  background: white;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--default-color);
}

.payment-method-info i {
  font-size: 1.5rem;
  color: var(--accent-color);
}

/* Action Buttons */
.success-actions {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.btn-action {
  flex: 1;
  padding: 18px 30px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-download {
  background: white;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.btn-download:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px
    color-mix(in srgb, var(--accent-color), transparent 60%);
}

.btn-continue {
  background: var(--accent-color);
  color: white;
  border: 2px solid var(--accent-color);
}

.btn-continue:hover {
  background: color-mix(in srgb, var(--accent-color), black 15%);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px
    color-mix(in srgb, var(--accent-color), transparent 60%);
}

/* Email Confirmation */
.email-confirmation {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: color-mix(in srgb, var(--accent-color), transparent 95%);
  border-left: 4px solid var(--accent-color);
  border-radius: 12px;
  margin-top: 30px;
}

.email-icon {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
}

.email-text h5 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: var(--heading-color);
}

.email-text p {
  margin: 0;
  color: var(--default-color);
  opacity: 0.9;
}

/* Next Steps Timeline */
.next-steps {
  background: white;
  padding: 35px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-top: 30px;
}

.next-steps h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--heading-color);
}

.steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 25px;
  position: relative;
  padding-left: 40px;
}

.steps-timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 30px;
  bottom: 30px;
  width: 3px;
  background: color-mix(in srgb, var(--default-color), transparent 85%);
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  position: relative;
}

.step-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  background: white;
  border: 3px solid color-mix(in srgb, var(--default-color), transparent 85%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--default-color);
  position: relative;
  z-index: 1;
  margin-left: -40px;
  transition: all 0.3s ease;
}

.step.completed .step-icon {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.step.active .step-icon {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-color), transparent 85%);
  animation: pulse 2s infinite;
}

.step-content h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--heading-color);
}

.step-content p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--default-color);
  opacity: 0.8;
}

/* Support Box */
.support-box {
  display: flex;
  gap: 25px;
  padding: 30px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent-color), transparent 95%),
    white
  );
  border-radius: 15px;
  margin-top: 30px;
}

.support-icon {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.support-content h5 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--heading-color);
}

.support-content p {
  margin-bottom: 15px;
  color: var(--default-color);
  opacity: 0.8;
}

.support-contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.contact-link:hover {
  color: color-mix(in srgb, var(--accent-color), black 20%);
  padding-left: 5px;
}

.contact-link i {
  font-size: 1.3rem;
}

/* Related Products */
.product-card-mini {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.product-card-mini:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.product-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.product-card-mini h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--heading-color);
}

.product-card-mini .product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.btn-view-product {
  display: inline-block;
  padding: 10px 25px;
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-view-product:hover {
  background: var(--accent-color);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .success-title {
    font-size: 2rem;
  }

  .success-subtitle {
    font-size: 1.1rem;
  }

  .order-confirmation-card {
    padding: 25px;
  }

  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .order-id {
    font-size: 1.5rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .order-item {
    flex-direction: column;
    text-align: center;
  }

  .success-actions {
    flex-direction: column;
  }

  .support-box {
    flex-direction: column;
    text-align: center;
  }

  .steps-timeline {
    padding-left: 30px;
  }
}
