/**
 * ==============================================================================
 * 🎨 BANNER & ADVERTISEMENT STYLES (High-Conversion Theme)
 * ออกแบบให้สะดุดตา สวยงาม และเข้ากับหน้าตาเครื่องมือโดยไม่รบกวน UX
 * ==============================================================================
 */

/* 1. Top Leaderboard Banner */
.ad-banner-top {
  width: 100%;
  padding: 10px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: 'Prompt', sans-serif;
  transition: all 0.3s ease;
}

.ad-banner-top-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ad-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.ad-text-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
}

.ad-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.ad-subtitle {
  font-size: 0.85rem;
  opacity: 0.9;
}

.ad-btn-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #1e3a8a;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.ad-btn-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 2. Contextual Result Banner (วางใต้ผลลัพธ์คำนวณ) */
.ad-banner-result {
  margin-top: 24px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-left: 5px solid #2563eb;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ad-banner-result:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
}

.ad-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ad-result-tag {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}

.ad-sponsored-label {
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.ad-result-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.ad-result-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.ad-result-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ad-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ad-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.ad-phone-hint {
  font-size: 0.85rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 3. Mobile Sticky Bottom Bar */
.ad-sticky-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  border-top: 1px solid #334155;
  animation: slideUpSticky 0.4s ease-out;
}

@keyframes slideUpSticky {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.ad-sticky-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.ad-sticky-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.ad-sticky-text {
  line-height: 1.25;
}

.ad-sticky-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.ad-sticky-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}

.ad-sticky-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #00B2FF 0%, #006AFF 50%, #9026FA 100%);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(0, 106, 255, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ad-sticky-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0, 106, 255, 0.6);
}

.ad-sticky-btn:active {
  transform: scale(0.96);
}

/* 4. Sponsor Card in Hub Grid */
.hub-sponsor-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #334155;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.hub-sponsor-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hub-sponsor-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.hub-sponsor-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.hub-sponsor-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  margin: 0;
  max-width: 650px;
  line-height: 1.5;
}

.hub-sponsor-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hub-sponsor-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.55);
}

@media (max-width: 768px) {
  .ad-text-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .ad-subtitle {
    display: none;
  }
  .hub-sponsor-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .hub-sponsor-btn {
    width: 100%;
    justify-content: center;
  }
}
