/**
 * Split from numart_main.css for maintainability.
 */

/* ========================================
   PROMOTION DETAILS MODAL
   ======================================== */

.promo-details-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.promo-details-overlay.active {
  opacity: 1;
  visibility: visible;
}

.promo-details-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.promo-details-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.promo-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

[dir="rtl"] .promo-modal-close {
  right: auto;
  left: 12px;
}

.promo-modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}

.promo-modal-close svg {
  stroke: #666;
}

.promo-modal-header {
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
  padding: 24px 20px;
  text-align: center;
  color: #fff;
}

/* Hide promo name row */
.promo-detail-row:has(.promo-offer-name) {
  display: none;
}

.promo-modal-icon {
  font-size: 40px;
  margin-bottom: 8px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.promo-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.promo-modal-content {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(80vh - 120px);
}

.promo-item {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.promo-item:last-child {
  margin-bottom: 0;
}

.promo-item-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
}

.promo-side-get .promo-item-badge {
  background: linear-gradient(135deg, #4caf50, #388e3c);
  color: #fff;
}

.promo-side-buy .promo-item-badge {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
}

.promo-side-both .promo-item-badge {
  background: linear-gradient(135deg, #e53935, #c62828);
  color: #fff;
}

.promo-badge-icon {
  font-size: 18px;
}

.promo-item-details {
  margin-bottom: 12px;
}

.promo-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed #e0e0e0;
  gap: 12px;
}

.promo-detail-row:last-child {
  border-bottom: none;
}

.promo-detail-label {
  color: #666;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 70px;
}

.promo-detail-value {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  text-align: end;
  line-height: 1.5;
}

/* Discount value row - enhanced styling */
.promo-discount-row {
  background: linear-gradient(135deg, #f0fff4, #e8f5e9);
  margin: -4px -8px 8px -8px;
  padding: 12px 16px !important;
  border-radius: 12px;
  border-bottom: none !important;
}

.promo-discount-amount {
  display: block;
  font-size: 11px;
  color: #666;
  font-weight: 400;
  margin-top: 4px;
}

/* Product links in promotion modal */
.promo-product-link {
  color: #e53935;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed #e53935;
  transition: all 0.2s ease;
}

.promo-product-link:hover {
  color: #c62828;
  border-bottom-style: solid;
  text-decoration: none;
}

.promo-condition-value {
  font-size: 12px;
  line-height: 1.4;
}

.promo-discount-row .promo-discount-value {
  background: linear-gradient(135deg, #4caf50, #388e3c);
  color: #fff;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  display: inline-block;
}

/* Promotion name styling */
.promo-name-row {
  background: linear-gradient(135deg, #ede7f6, #e8eaf6);
  margin: -4px -8px 8px -8px;
  padding: 10px 16px !important;
  border-radius: 12px;
  border-bottom: none !important;
}

.promo-offer-name {
  color: #5e35b1;
  font-weight: 700;
}

/* End date styling */
.promo-dates-row {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  margin: 8px -8px -4px -8px;
  padding: 10px 16px !important;
  border-radius: 12px;
  border-bottom: none !important;
}

.promo-end-date {
  color: #e65100;
  font-weight: 600;
}

.promo-how-to {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #90caf9;
}

.promo-how-to-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.promo-how-to-text {
  font-size: 12px;
  line-height: 1.5;
  color: #1565c0;
}

body.promo-modal-open {
  overflow: hidden;
}

/* Mobile adjustments for promo modal */
@media (max-width: 576px) {
  .promo-details-modal {
    width: 95%;
    max-width: 95%;
    max-height: 80vh;
  }
  
  .promo-modal-header {
    padding: 16px;
  }
  
  .promo-modal-icon {
    font-size: 32px;
    margin-bottom: 6px;
  }
  
  .promo-modal-title {
    font-size: 17px;
  }
  
  .promo-modal-content {
    padding: 12px;
  }
  
  .promo-item {
    padding: 12px;
  }
  
  .promo-item-badge {
    padding: 10px 14px;
    border-radius: 16px;
    margin-bottom: 12px;
  }
  
  .promo-badge-icon {
    font-size: 18px;
  }
  
  .promo-badge-text {
    font-size: 13px;
  }
  
  .promo-item-details {
    gap: 8px;
  }
  
  .promo-detail-row {
    padding: 8px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .promo-detail-label {
    font-size: 12px;
    min-width: auto;
  }
  
  .promo-detail-value {
    font-size: 13px;
    text-align: start;
  }
  
  .promo-discount-row,
  .promo-name-row,
  .promo-dates-row {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap;
  }
  
  .promo-discount-value {
    padding: 5px 12px;
    font-size: 11px;
  }
  
  .promo-how-to {
    padding: 8px 10px;
    margin-top: 8px;
    gap: 6px;
  }
  
  .promo-how-to-icon {
    font-size: 16px;
  }
  
  .promo-how-to-text {
    font-size: 11px;
  }
  
  .promo-modal-close {
    width: 28px;
    height: 28px;
    font-size: 18px;
    top: 8px;
    left: 8px;
  }
}

