/* Success Popup */
.success-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.success-popup-dialog {
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Close Button */
.success-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 16px;
  height: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  z-index: 10;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.success-popup-close:hover {
  opacity: 0.7;
}

/* Header Section */
.success-popup-header {
  background-image: url("../images/order/bg-dialog.png");
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px 0;
  overflow: hidden;
}

/* Decorative Dots */
.success-popup-dots {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 161px;
  pointer-events: none;
}

.success-popup-dots .dot {
  position: absolute;
  border-radius: 50%;
}

.dot-1 {
  width: 8px;
  height: 8px;
  background: #FFDF20;
  opacity: 0.8;
  left: 28px;
  top: 0;
}

.dot-2 {
  width: 6px;
  height: 6px;
  background: white;
  opacity: 0.6;
  left: 68px;
  top: 12px;
}

.dot-3 {
  width: 10px;
  height: 10px;
  background: #FFF085;
  opacity: 0.7;
  right: 42px;
  top: 4px;
}

.dot-4 {
  width: 6px;
  height: 6px;
  background: #FCCEE8;
  opacity: 0.8;
  right: 78px;
  top: 20px;
}

.dot-5 {
  width: 4px;
  height: 4px;
  background: white;
  opacity: 0.5;
  left: 44px;
  top: 149px;
}

.dot-6 {
  width: 8px;
  height: 8px;
  background: #FEF9C2;
  opacity: 0.6;
  right: 32px;
  top: 153px;
}

/* Character with glow */
.success-popup-character {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 11px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 10px;
  z-index: 2;
}

.character-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(230, 0, 65, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
}

.success-popup-character img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* Title Section */
.success-popup-title-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  margin-bottom: 15px;
}

.success-popup-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  color: white;
  margin: 0;
  padding: 0 10px;
  text-transform: uppercase;
}

.success-popup-delivery-time {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.delivery-label {
  font-weight: 700;
  color: white;
  line-height: 1.4;
}

.delivery-date {
  background: white;
  border: 1px solid #E60041;
  border-radius: 50px;
  padding: 2px 16px;
  font-size: 16px;
  font-weight: 800;
  color: #E60041;
  line-height: 1.4;
}

.success-popup-subtitle {
  font-size: 14px;
  line-height: 1.4;
  color: white;
  padding: 0 20px;
}

.subtitle-line1 {
  font-weight: 500;
  margin: 0 0 2px 0;
}

.subtitle-line2 {
  font-weight: 800;
  margin: 0;
}

/* Content Section */
.success-popup-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: #FFF0ED;
}

/* Order Card */
.success-order-card {
  background: white;
  border: 1px solid #FCE7F3;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Order Header */
.success-order-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-icon {
  width: 36px;
  height: 36px;
  background: #FFF0F0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.order-id-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-id-label {
  font-size: 13px;
  font-weight: 400;
  color: #333;
  line-height: 1.4;
  margin: 0;
}

.order-id-value {
  font-size: 15px;
  font-weight: 700;
  color: #E8315B;
  line-height: 1.4;
  letter-spacing: 0.75px;
  margin: 0;
}

/* Order Details */
.success-order-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid #FCCEE8;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.detail-label {
  font-weight: 400;
  color: #888;
  flex-shrink: 0;
}

.detail-value {
  font-weight: 400;
  color: #333;
  text-align: right;
  word-break: break-word;
}

.detail-price {
  font-weight: 700;
  color: #E8315B;
}

/* Gift Badge */
.success-gift-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: white;
  border: 1px solid white;
  border-radius: 10px;
}

.gift-badge-icon {
  width: 24px;
  height: 24px;
  background: #E60041;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gift-badge-text {
  font-size: 13px;
  font-weight: 400;
  color: #666;
  line-height: 1.4;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gift-badge-text strong {
  font-weight: 700;
  color: #E8315B;
}

/* Error Popup Styles */
.error-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.error-popup-dialog {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.error-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  color: #E60041;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.error-popup-close:hover {
  opacity: 1;
}

.error-popup-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: 100%;
}

.error-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
}

.error-icon-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.error-popup-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.error-popup-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 30px;
  color: #E60041;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0px 1px 4px rgba(0, 0, 0, 0.15);
}

.error-popup-message {
  font-size: 14px;
  font-weight: 400;
  line-height: 21.429px;
  color: #333;
  text-align: center;
}

.error-popup-message p {
  margin: 0;
}

.error-popup-btn {
  width: 100%;
  height: 47px;
  background: linear-gradient(180deg, #E8315B 0%, #FF5A7C 100%);
  border: none;
  border-radius: 9999px;
  box-shadow: 0px 10px 15px 0px rgba(252, 206, 232, 0.5), 0px 4px 6px 0px rgba(252, 206, 232, 0.5);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 21px;
  letter-spacing: 0.7px;
  color: white;
  text-align: center;
  transition: opacity 0.2s;
}

.error-popup-btn:hover {
  opacity: 0.9;
}

.error-popup-btn:active {
  transform: scale(0.98);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  /* Hide dot-5 and dot-6 on mobile */
  .dot-5,
  .dot-6 {
    display: none;
  }
}
