/* ========== SCROLLING TEXT ADS ========== */

.text-ads-bar {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 20px auto 0;
  height: 48px;
  overflow: hidden;
  border-radius: 6px;
  background: #0d6efd0f;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  font-size: 14px;
}

.text-ads-track {
  display: inline-flex;
  white-space: nowrap;
  animation: textAdsMarquee 18s linear infinite;
}

.ad-item {
  display: inline-block;
  padding: 0 32px;
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}

.ad-item:hover {
  text-decoration: underline;
}

/* pause on hover */
.text-ads-bar:hover .text-ads-track {
  animation-play-state: paused;
}

@keyframes textAdsMarquee {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ========== FEATURED OPPORTUNITIES TABLE ========== */

.featured-ads {
  max-width: 1000px;
  margin: 20px auto;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
}

.featured-ads-header {
  padding: 10px 16px;
  border-bottom: 1px solid #e3e3e3;
  background: #f8f9fa;
  font-weight: 600;
}

.fa-row {
  display: grid;
  grid-template-columns: 1fr 180px 130px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid #f1f1f1;
}

.fa-head {
  font-weight: 600;
  background: #fcfcfc;
}

.fa-col-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fa-col-cat {
  color: #555;
}

.fa-col-act {
  text-align: right;
}

.fa-icon {
  width: 18px;
}

.fa-link {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 600;
}

.fa-link:hover {
  text-decoration: underline;
}

.fa-desc {
  color: #444;
}

.fa-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 4px;
  background: #0d6efd;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.fa-btn:hover {
  background: #0b5ed7;
}

/* ========== MOBILE OPTIMISATION ========== */

@media (max-width: 768px) {
  /* text ads bar */
  .text-ads-bar {
    max-width: 100%;
    height: auto;
    padding: 8px 0;
    font-size: 13px;
  }

  .ad-item {
    padding: 0 16px;
  }

  /* featured ads block */
  .featured-ads {
    margin: 16px 8px;
    border-radius: 0;
  }

  .fa-row {
    grid-template-columns: 1fr;      /* stack columns */
    row-gap: 6px;
    padding: 10px 12px;
  }

  .fa-head {
    display: none;                   /* hide header row on mobile */
  }

  .fa-col-title {
    align-items: flex-start;
  }

  .fa-col-cat {
    font-size: 12px;
    color: #777;
  }

  .fa-col-act {
    text-align: left;
  }

  .fa-btn {
    margin-top: 4px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* very small screens */
@media (max-width: 480px) {
  .text-ads-bar {
    font-size: 12px;
  }

  .featured-ads-header {
    padding: 8px 10px;
    font-size: 13px;
  }

  .fa-row {
    padding: 8px 10px;
  }
}

/* ========== PASTE PAGE MOBILE FIXES ========== */
@media (max-width: 768px) {

  .layout-grid {
    display: block !important;
  }

  .layout-grid .content {
    width: 100% !important;
  }

  /* allow code / long text scroll */
  .layout-grid .paste-content {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  /* ads full width below paste */
  .layout-grid .featured-ads,
  .layout-grid .text-ads-bar {
    max-width: 100% !important;
    margin: 12px 0 0 !important;
  }

  /* featured ads stack */
  .layout-grid .featured-ads .fa-row {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .layout-grid .featured-ads .fa-head {
    display: none;
  }

  .layout-grid .featured-ads .fa-col-act {
    text-align: left;
  }
}

/* =====================================================
   AdBlock Detection Modal (Theme-Aware)
   ===================================================== */
.adblock-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.adblock-modal.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.adblock-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-left: 4px solid #f59e0b; /* Warning orange */
    border-radius: 8px;
    padding: 20px;
    width: 320px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.adblock-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.adblock-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
}

.adblock-content p {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.adblock-actions {
    display: flex;
    gap: 8px;
}

.adblock-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px 12px;
    min-height: auto;
}

/* Mobile adjustment */
@media (max-width: 480px) {
    .adblock-modal {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    .adblock-content {
        width: 100%;
    }
    .adblock-actions {
        flex-direction: column;
    }
}
