/* Test style to verify CSS loading */
body::after {
    content: 'Popup CSS Loaded';
    position: fixed;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 99999;
    display: none; /* Change to 'block' to test if CSS loads */
}

/* استايل الهدايا الطائرة */
@keyframes floatUp {
  from {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Flying Tools Container */
.flying-tools-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

/* Individual flying tool */
.flying-tool {
  position: absolute;
  font-size: 2rem;
  pointer-events: none;
  user-select: none;
  opacity: 0.9;
  z-index: 10000;
  will-change: transform, opacity;
}

/* Special styling for specific tools */
.flying-tool[data-tool="✂️"] {
  transform: rotate(45deg);
}

.flying-tool[data-tool="🪒"] {
  transform: rotate(-15deg);
}

/* استايل نافذة عرض اليوم العائمة */
.popup-offer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30,40,60,0.38);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInBg 0.4s;
}
@keyframes fadeInBg { from{opacity:0;} to{opacity:1;} }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.popup-offer {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
  max-width: 90vw;
  max-height: 90vh;
  width: 400px;
  padding: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.popup-offer .image-container {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin: 0;
  background: #f8f9fa;
  border: none;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

.popup-offer img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
}

.popup-offer,
.popup-offer * {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.popup-offer::-webkit-scrollbar,
.popup-offer *::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* Make the popup more compact */
.popup-offer {
  max-height: 95vh;
  overflow-y: auto;  /* Allow scrolling if content is too tall */
}

/* Hide scrollbar for a cleaner look */
.popup-offer::-webkit-scrollbar {
  width: 5px;
}

.popup-offer::-webkit-scrollbar-thumb {
  background: #1976d2;
  border-radius: 5px;
}

.popup-offer a.offer-link {
  display: block;
  margin: 20px auto;
  background: #3498db;
  color: #fff;
  font-weight: 600;
  padding: 10px 25px;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
  width: auto;
  max-width: 80%;
}

.popup-offer a.offer-link:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.popup-offer .close-btn {
  position: absolute;
  right: 12px;
  top: 8px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
  z-index: 1;
}

.popup-offer .close-btn:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: white;
  transform: rotate(90deg);
}

/* تجاوب النافذة مع الشاشات الصغيرة */
@media (max-width: 767.98px) {
  .popup-offer {
    width: 95%;
    height: auto;
    max-height: 90vh;
  }
  
  .popup-offer img {
    height: auto;
    max-height: 70vh;
  }

  .popup-offer a.offer-link {
    margin: 15px auto;
    padding: 10px 0;
    font-size: 1.1rem;
    width: 180px;
  }
}