/* static/css/sponsored_ads.css — SwiftPOS Sponsored Adverts Design System */

/* Top Announcement Bar Ad */
.sp-ad-top-bar {
  background: linear-gradient(135deg, #0a165e 0%, #1e2fa0 100%);
  color: #ffffff;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  position: relative;
  z-index: 1030;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.sp-ad-top-bar a {
  color: #f59e0b;
  text-decoration: underline;
  font-weight: 700;
  margin-left: 6px;
  transition: color 0.2s ease;
}
.sp-ad-top-bar a:hover {
  color: #ffffff;
}
.sp-ad-top-bar .sp-ad-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 8px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Header Banner Ad */
.sp-ad-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 0;
  text-align: center;
}
.sp-ad-header img {
  max-height: 60px;
  width: auto;
  border-radius: 6px;
}

/* Footer Banner Ad */
.sp-ad-footer {
  background: #060e40;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
  text-align: center;
}

/* General Ad Containers */
.sp-ad-container {
  display: block;
  margin: 1.5rem 0;
  position: relative;
}

.sp-ad-badge-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 4px;
}

/* Text & CTA Card Advert */
.sp-ad-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(10, 22, 94, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (min-width: 768px) {
  .sp-ad-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.sp-ad-card:hover {
  box-shadow: 0 8px 20px rgba(10, 22, 94, 0.12);
  transform: translateY(-2px);
}
.sp-ad-card .sp-ad-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.sp-ad-card .sp-ad-badge {
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  text-transform: uppercase;
}
.sp-ad-card .sp-ad-sponsor {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}
.sp-ad-card h5 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}
.sp-ad-card p {
  font-size: 0.85rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}
.sp-ad-btn {
  background: #0a165e;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.sp-ad-btn:hover {
  background: #1e2fa0;
  color: #ffffff !important;
}

/* Image Banner Ad */
.sp-ad-image-box {
  text-align: center;
}
.sp-ad-image-box img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Popup Advert Modal */
.sp-ad-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sp-ad-modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: spAdModalFadeIn 0.3s ease;
}
@keyframes spAdModalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.sp-ad-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}
