/* ========================= 
   BASE (minimal, non-intrusive)
   ========================= */
.bwt { font-family: Arial, sans-serif; color: #102432; }
.hidden { display: none !important; }

/* Keep generic plugin elements functional */
.bwt-loader {
  display: none; align-items: center; gap: 10px;
  padding: 8px 12px; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 999px; margin: 8px 0 18px; transform: translate(-50%, -50%);
}
.bwt-loader .bwt-spinner {
  width: 16px; height: 16px; border: 2px solid #e2e8f0;
  border-top-color: #1e40af; border-radius: 50%;
  animation: bwt-spin 1s linear infinite; 
}
.bwt-loader .bwt-loader-text { font-size: 0.9rem; color: #64748b; }
@keyframes bwt-spin { to { transform: rotate(360deg); } }

/* Generic note */
.bwt .bwt-note { font-size: 0.9rem; color: #64748b; margin-top: 8px; }

/* =========================================
   YOUR LEGACY DESIGN (faithfully reproduced)
   Applied to current markup
   ========================================= */

/* Container (use id and class for safety) */
#bwt-container,
.bwt-container {
  font-family: Arial, sans-serif;
  margin: 20px auto;
  max-width: 900px;
  background: #0d2236;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  color: #f1f1f1;
}

.centered { text-align: center; margin-bottom: 20px; }

/* Reveal button */
.bwt-button {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  min-width: 300px;
  background: linear-gradient(135deg, #4a90e2, #50e3c2);
  box-shadow: 0 4px 12px rgba(0, 198, 183, 0.4);
  color: white;
  border: 3px solid #3a78c2;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.bwt-button:hover { background: #005f8d; }

/* Cards list container */
.bwt-cards {
  width: 100%; box-sizing: border-box; padding: 12px;
  background: transparent; color: #102432; /* card content text */
}

/* Single card */
.bwt-card {
  border: 2px solid #0b3d91;       /* Dark navy border */
  border-radius: 8px;
  background-color: #fff;
  padding: 16px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  width: 100%;
}

/* Rank */
.bwt-rank { position: relative; }
.bwt-rank span {
  position: absolute;
  top: 55%;
  left: -27px;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #1f2937;
  color: #1f2937;
  font-weight: 700; font-size: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  z-index: 2;
}

/* Logo column */
.bwt-logo { position: relative; display: flex; align-items: center; justify-content: flex-start; min-height: 220px; }
.bwt-logo img {
  max-width: 250px; max-height: 220px; display: block; object-fit: contain; -webkit-user-drag: none;
}
.bwt-logo-placeholder {
  min-width: 110px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: transparent; color: #1f2937; font-weight: 700; font-size: 15px;
}

/* Badge overlay */
.bwt-badge {
  position: absolute; top: -8px; left: -8px;
  background: #0f6b4a; color: #fff;
  padding: 6px 10px; border-radius: 4px;
  font-weight: 700; font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Main area */
.bwt-main { min-width: 0; flex: 1; }

/* Title + tagline */
.bwt-title {
  margin: 0 0 10px 0; font-size: 16px; color: #173248;
  line-height: 1.25; display: flex; align-items: center; gap: 8px;
}
.bwt-name { font-weight: 800; }
.bwt-tagline { font-weight: 400; color: #4b5563; font-size: 15px; }
.bwt-read-review { margin-left: 10px; color: #0b63a5; text-decoration: none; font-size: 14px; }
.bwt-read-review:hover { text-decoration: underline; }

/* Features list */
.bwt-features {
  list-style: none; padding: 0; margin: 0; transition: max-height 0.38s ease-in-out; overflow: visible;
}
.bwt-features li {
  position: relative; padding-left: 28px; margin: 0 0 1px 0; color: #1f3342;
  font-size: 14px; line-height: 24px;
}
.bwt-features li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23007ACC' d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>");
  background-repeat: no-repeat; background-size: 18px 18px;
}

/* Side column */
.bwt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; text-align: right; }

/* Rating label */
.rating-label { color: #1f6fbf; font-weight: 700; font-size: 14px; margin-bottom: 6px; }

/* Rating box */
.rating-box { display: flex; align-items: center; gap: 10px; background: transparent; }
.rating-stars { display: flex; gap: 4px; align-items: center; }
.rating-stars svg { width: 16px; height: 16px; flex: 0 0 16px; }

/* Numeric score */
.rating-score {
  background: #1e73be; color: #fff; padding: 8px 12px;
  border-radius: 8px; font-weight: 800; font-size: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* CTA button */
.bwt-cta-btn {
  display: inline-block; background: #ef4d5c; color: #fff;
  padding: 5px 10px; border-radius: 8px; text-align: center; max-width: 150px;
  font-weight: 800; font-size: 15px; transition: background .15s ease, transform .08s ease;
}
.bwt-cta-btn:hover { background: #d93b4b; transform: translateY(-2px); }

/* Responsive adjustments for cards */
@media (max-width: 1024px) {
  .bwt-card {
    grid-template-columns: 50px 110px 1fr 150px;
    padding: 14px;
  }
  .bwt-logo img { max-width: 100px; }
  .rating-score { font-size: 15px; padding: 6px 10px; }
}
@media (max-width: 700px) {
  .bwt-card { display: block; padding: 14px; }
  .bwt-rank { float: left; margin-right: 12px; margin-bottom: 8px; }
  .bwt-logo { margin-top: 6px; margin-bottom: 10px; }
  .bwt-main { margin-bottom: 12px; }
  .bwt-side { align-items: flex-start; text-align: left; }
}

/* No data */
.bwt-no-data {
  color: #fff; background: #7a8694; padding: 12px; border-radius: 6px;
}

/* Reveal feature list (animated) */
.feature-list {
  list-style: none; padding: 0; margin: 20px 0;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  max-height: 120px; overflow: hidden; transition: max-height 0.5s ease, opacity 0.4s ease; opacity: 1;
}
.feature-list li {
  opacity: 0; font-size: 18px; color: #fff; background: #4DB6AC;
  border-left: 6px solid #ff9800; padding: 5px 20px; border-radius: 10px; width: 100%; max-width: 375px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: opacity 0.5s ease;
}
.feature-list:not(.collapsed) { max-height: 1000px; opacity: 1; }
.feature-list.collapsed { max-height: 120px; opacity: 0.8; }

/* Affiliate button (reveal) */
.affiliate-button {
  display: inline-block; margin-top: 20px; margin-bottom: 50px; background: #28a745; color: white;
  padding: 12px 25px; border-radius: 6px; font-size: 16px; text-decoration: none;
  opacity: 0; transition: opacity 0.5s ease-in-out; width: 100%; max-width: 375px;
}
.affiliate-button.visible { opacity: 1; }

/* Collapse + view all gradient overflow */
.bwt-features.collapsed { overflow: hidden; position: relative; }
.bwt-features.collapsed::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff); pointer-events: none;
}
.view-all-btn {
  display: inline-block;
  margin-top: -20px;
  padding: 10px 16px;
  background: #091825;
  box-shadow: 0 4px 12px rgba(0, 198, 183, 0.4);
  color: white;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.9;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 300px;
  text-align: center;
}
.view-all-btn:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255, 0, 0, 0.5);
}
.view-all-btn:active { transform: translateY(1px); }

/* Best (reveal) container */
.bwt-best {
  background: #0D2236; border-radius: 12px; padding: 20px; margin-top: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); transition: all 0.3s ease-in-out; color: #102432;
}
.bwt-best-features {
  list-style: none; padding-left: 0; margin-top: 15px; max-height: none; overflow: visible; transition: max-height 0.4s ease-in-out;
}
.bwt-best-features.collapsed { max-height: 240px; overflow: hidden; position: relative; }
.bwt-best-features.collapsed::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #0D2236); pointer-events: none;
}
.bwt-best-link,
.affiliate-button {
  display: inline-block; width: 100%; max-width: 375px; margin-top: 20px; padding: 12px 22px;
  font-size: 20px; font-weight: 600; background-color: #C82909; color: #fff !important; text-decoration: none;
  border-radius: 6px; opacity: 0; transition: opacity 0.4s ease, background-color 0.3s ease-in-out;
}
.bwt-best-link.visible,
.affiliate-button.visible { opacity: 1; }
.bwt-best-link:hover,
.affiliate-button:hover { background-color: #e0484c; }

/* Reveal button variant */
.bwt-reveal-btn {
  background-color: #C82909; width: 100%; max-width: 375px; color: #fff;
  padding: 10px 18px; border: none; border-radius: 6px; cursor: pointer;
  font-size: 18px; font-weight: 600; transition: background-color 0.3s ease-in-out;
}
.bwt-reveal-btn:hover { background-color: #091825; }
.bwt-reveal-btn:disabled { background-color: #6c757d; cursor: not-allowed; }

/* Buttons container */
.bwt-buttons {
  display: flex; gap: 5px; margin-top: 12px; justify-content: center; flex-wrap: wrap;
}
.bwt-buttons .view-all-btn,
.bwt-buttons .affiliate-button { flex: 1 1 auto; text-align: center; max-width: 300px; }

/* Filters section (id + class for compatibility) */
#bwt-filters,
.bwt-filters { position: relative; margin: 50px auto 20px auto; padding-top: 10px; }
#bwt-filters h3,
.bwt-filters h3 {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  height: 40px; width: 240px; line-height: 35px; margin: 0;
  background: linear-gradient(135deg, #4a90e2, #50e3c2); color: white; font-size: 18px; font-weight: bold;
  font-family: 'Roboto', Arial, sans-serif; text-align: center; border: 3px solid #3a78c2; border-radius: 15px;
  user-select: none; pointer-events: none; z-index: 10; box-shadow: 0 3px 8px rgba(74, 144, 226, 0.7);
}

/* Checkbox styles */
.checkbox-box {
  border: 3px solid #3a78c2; padding: 15px; border-radius: 6px; background-color: #fff;
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px 20px; box-sizing: border-box;
}
.checkbox-box label {
  display: inline-flex; align-items: center; font-size: 16px; color: #000;
  border-bottom: 1px solid #3a78c2; padding-bottom: 4px;
}
.checkbox-box input[type="checkbox"] { margin-right: 6px; }
.checkbox-box label:nth-last-child(-n+3) { border-bottom: none; }

/* Responsive for filters and misc */
@media (max-width: 768px) {
  .checkbox-box { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 480px) {
  .checkbox-box { grid-template-columns: 1fr !important; }
  .bwt-reveal-btn { font-size: 16px; padding: 8px 14px; width: 100%; }
  .checkbox-box label { font-size: 14px; }
  .feature-list li { font-size: 16px; padding: 5px 14px; max-width: 100%; }
}
#best-bwt-buttons {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers them horizontally */
    gap: 10px; /* Space between buttons */
}

/* ✅ MOBILE-ONLY FIXES (NON-INTRUSIVE) */
@media (max-width: 480px) {
  #bwt-container,
  .bwt-container {
    width: 100%;
    padding: 12px;
    margin: 10px auto;
  }
  .bwt-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .bwt-logo {
    display: flex;
    justify-content: center;
    min-height: auto;
    margin: 10px 0;
  }
  .bwt-logo img {
    max-width: 100%;
    height: auto;
  }
  .bwt-side {
    align-items: flex-start;
    text-align: left;
    width: 100%;
    margin-top: 10px;
  }
  .bwt-button,
  .bwt-cta-btn,
  .bwt-reveal-btn,
  .view-all-btn,
  .affiliate-button {
    width: 100% !important;
    max-width: 100% !important;
  }
  #best-bwt-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  #best-bwt-buttons a,
  #best-bwt-buttons button,
  #best-bwt-buttons img {
    max-width: 90%;
    height: auto;
  }
  .checkbox-box {
    grid-template-columns: 1fr !important;
    padding: 12px;
  }
  .checkbox-box label { font-size: 14px; }
}
