/* Featured Miners — Responsive overrides
   Place in: /wp-content/themes/your-theme/css/responsive.css
*/

/* ---------- Base / safety resets ---------- */
.featured-miners-wrapper {
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 40px;
}

/* Ensure H2 looks the same but is easier to override */
.featured-miners-wrapper h2 {
  background: #2a5dd3 !important;
  color: #fff !important;
  padding: 12px 20px !important;
  border-radius: 6px 6px 0 0 !important;
  margin: 0 !important;
  font-size: 20px !important;
  text-align: center !important;
}

/* Grid container */
.featured-miners-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 20px !important;
  background: #fff !important;
  border: 1px solid #ddd !important;
  border-top: none !important;
  padding: 20px !important;
  border-radius: 0 0 6px 6px !important;
  box-sizing: border-box;
}

/* Card basics (overrides many inline styles using !important) */
.featured-miner-card {
  display: block !important;
  text-decoration: none !important;
  color: #222 !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  background: #fff !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 8px !important;
  padding: 20px !important;
  text-align: center !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
  box-sizing: border-box;
  /* make flexible — original inline used: flex:1 1 calc(33.333% - 20px); */
  flex: 1 1 calc(33.333% - 20px) !important;
  max-width: 300px !important;
  min-width: 220px;
}

/* Visual interaction */
.featured-miner-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
}

/* Image wrapper and image */
.featured-miner-card > div {
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  height: 140px !important;
  margin-bottom: 12px !important;
  box-sizing: border-box;
}

.featured-miner-card img {
  max-width: 100% !important;
  height: auto !important;
  max-height: 120px !important;
  width: auto;
  display: block;
}

/* Title & CTA styling */
.featured-miner-card h3 {
  font-size: 18px !important;
  margin: 10px 0 !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  overflow-wrap: anywhere;
}

.featured-miner-card .miner-cta,
.featured-miner-card span { /* inline used a span as button */
  display: inline-block !important;
  background: #2a5dd3 !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  box-sizing: border-box;
}

/* ---------- Responsive breakpoints ---------- */

/* Large tablet / small laptop — two columns */
@media (max-width: 1024px) {
  .featured-miner-card {
    flex: 1 1 calc(50% - 20px) !important;
    max-width: 46% !important;
    min-width: 240px;
  }
  .featured-miner-card > div { height: 120px !important; }
  .featured-miner-card img { max-height: 100px !important; }
}

/* Tablets and small screens — single column stacking */
@media (max-width: 768px) {

  /* make the grid full width and with comfortable padding */
  .featured-miners-grid {
    padding: 16px !important;
    gap: 14px !important;
  }

  /* Stack cards vertically */
  .featured-miner-card {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 16px !important;
    display: block;
  }

  /* reduce image area height to save vertical space */
  .featured-miner-card > div {
    height: 110px !important;
    margin-bottom: 10px !important;
  }
  .featured-miner-card img { max-height: 90px !important; }

  .featured-miner-card h3 { font-size: 16px !important; }
  .featured-miner-card .miner-cta,
  .featured-miner-card span { font-size: 14px !important; padding: 8px 12px !important; }
}

/* Very small phones */
@media (max-width: 480px) {

  .featured-miners-wrapper { margin-bottom: 24px !important; }

  /* center everything more tightly */
  .featured-miner-card {
    padding: 12px !important;
    border-radius: 6px !important;
  }

  .featured-miner-card > div { height: 90px !important; }
  .featured-miner-card img { max-height: 70px !important; }

  .featured-miner-card h3 { font-size: 15px !important; margin: 8px 0 !important; }
  .featured-miner-card .miner-cta,
  .featured-miner-card span { font-size: 13px !important; padding: 7px 10px !important; }

  /* Make sure text doesn't overflow */
  .featured-miner-card h3,
  .featured-miner-card span {
    white-space: normal !important;
  }
}

/* ===============================
   F2Pool Home Table – Responsive
   =============================== */

/* General reset */
.f2pool-home-table {
  width: 100%;
  border-collapse: collapse;
  font-family: inherit;
  table-layout: auto;
}

/* Allow horizontal scroll on small screens */
.f2pool-home-wrapper {
  width: 100%;
  overflow-x: auto;
}

/* Table cells on desktop stay same */
.f2pool-home-table td,
.f2pool-home-table th {
  white-space: nowrap;
}

/* Details wrapper (chart + calc) */
.details-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

/* Chart and calculator boxes */
.details-chart,
.details-calc {
  background: #fff;
  border: 1px solid #e4e7ef;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 16px;
}

/* Chart canvas responsive height */
.details-chart canvas {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
}

/* ===============================
   Medium Devices (≤ 1024 px)
   =============================== */
@media (max-width: 1024px) {
  .details-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .details-chart, .details-calc {
    flex: 1 1 100% !important;
    width: 100%;
  }

  .details-calc {
    border-left: none;
    padding: 18px;
  }

  table.f2pool-home-table.mining-comparison-table th,
  table.f2pool-home-table.mining-comparison-table td {
    padding: 10px 12px;
    font-size: 14px;
  }

  .coin-icon {
    width: 22px;
    height: 22px;
  }

  .coin-text {
    font-size: 14px;
  }
}

/* ===============================
   Tablets & Small Screens (≤ 768 px)
   =============================== */
@media (max-width: 768px) {
  /* Make table scroll horizontally instead of squishing */
  .f2pool-home-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .f2pool-home-table {
    min-width: 640px;
  }

  /* Expand row details to vertical layout */
  .details-wrapper {
    flex-direction: column;
    gap: 16px;
  }

  .details-chart canvas {
    aspect-ratio: 4 / 3;
  }

  .rev-input {
    width: 100px;
    padding: 6px 8px;
  }

  .rev-output-main {
    font-size: 15px;
  }

  .rev-output-usd {
    font-size: 14px;
  }
}

/* ===============================
   Phones (≤ 480 px)
   =============================== */
@media (max-width: 480px) {
  /* Compact table header text */
  table.f2pool-home-table.mining-comparison-table th {
    font-size: 13px;
    padding: 8px 6px;
  }
  table.f2pool-home-table.mining-comparison-table td {
    font-size: 13px;
    padding: 8px 6px;
  }

  /* Coin cell */
  .coin-cell {
    flex-wrap: wrap;
    gap: 6px;
  }

  .coin-icon {
    width: 20px;
    height: 20px;
  }

  .coin-text {
    font-size: 13px;
  }

  /* Detail box vertical stacking */
  .details-wrapper {
    flex-direction: column;
    gap: 12px;
  }

  .details-chart, .details-calc {
    width: 100%;
    padding: 14px;
  }

  .rev-input {
    width: 80px;
    font-size: 13px;
  }

  .rev-output-main {
    font-size: 14px;
  }

  .rev-output-usd {
    font-size: 13px;
  }

  /* Make everything scroll nicely */
  .f2pool-home-wrapper::-webkit-scrollbar {
    height: 6px;
  }
  .f2pool-home-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
  }
}


/* ===================================================
   🌐 GLOBAL RESPONSIVE STYLES for F2Pool tables
   =================================================== */

/* Wrapper scroll for small screens */
.f2pool-allcoins-wrapper,
.modern-f2pool-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

/* Base Table Styling */
.f2pool-allcoins-table,
.modern-f2pool-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px; /* ensures scroll instead of squish */
}

/* Table Cell Styling */
.f2pool-allcoins-table td,
.f2pool-allcoins-table th,
.modern-f2pool-table td,
.modern-f2pool-table th {
  white-space: nowrap;
  padding: 12px 16px;
  font-size: 15px;
}

/* Ensure coin/miner names don’t break weirdly */
.coin-cell,
.miner-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-cell img,
.miner-name img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
}

/* ===============================
   📱 Tablet screens (≤ 1024px)
   =============================== */
@media (max-width: 1024px) {
  table.f2pool-allcoins-table,
  table.modern-f2pool-table {
    font-size: 14px;
  }

  .f2pool-allcoins-wrapper,
  .modern-f2pool-wrapper {
    overflow-x: auto;
  }

  th,
  td {
    padding: 10px 12px !important;
  }
}

/* ===============================
   📱 Mobile screens (≤ 768px)
   =============================== */
@media (max-width: 768px) {

  /* Enable horizontal scroll for big tables */
  .f2pool-allcoins-wrapper,
  .modern-f2pool-wrapper {
    overflow-x: scroll;
  }

  table.f2pool-allcoins-table,
  table.modern-f2pool-table {
    min-width: 700px;
  }

  /* Center Load More Button */
  #load-more-coins {
    width: 100%;
    padding: 12px 0;
    font-size: 15px;
    border-radius: 8px;
  }

  /* Adjust fonts for mobile readability */
  th,
  td {
    font-size: 13px !important;
  }

  .coin-text {
    font-size: 13px;
  }

  .miner-name a {
    font-size: 13px;
  }
}

/* ===============================
   📱 Small Mobile screens (≤ 480px)
   =============================== */
@media (max-width: 480px) {
  /* Scroll handling */
  .f2pool-allcoins-wrapper::-webkit-scrollbar,
  .modern-f2pool-wrapper::-webkit-scrollbar {
    height: 6px;
  }

  .f2pool-allcoins-wrapper::-webkit-scrollbar-thumb,
  .modern-f2pool-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
  }

  /* Reduce padding and spacing */
  th,
  td {
    padding: 8px 6px !important;
    font-size: 12.5px !important;
  }

  /* Icons smaller */
  .coin-cell img,
  .miner-name img {
    width: 18px;
    height: 18px;
  }

  /* Buttons fit mobile width */
  #load-more-coins {
    width: 100%;
    padding: 10px;
    font-size: 14px;
  }

  /* Profit color emphasis */
  .profit-positive {
    color: #1aa260;
  }
  .profit-negative {
    color: #d93025;
  }
}

/* ============================================
   🛠 Fix for long miner names overflowing columns
   ============================================ */

/* Base fix for all screen sizes */
.miner-name {
  max-width: 240px;          /* controls column width */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tooltip-style full name on hover (desktop only) */
@media (min-width: 769px) {
  .miner-name[title] {
    cursor: help;
  }
}

/* For tablet and mobile — make layout flexible */
@media (max-width: 1024px) {
  .miner-name {
    max-width: 180px;
  }
}

@media (max-width: 768px) {
  .miner-name {
    max-width: 140px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .miner-name {
    max-width: 120px;
    font-size: 12.5px;
  }
}

/* =========================================================
   💎 Miner Detail Page Responsive Layout
   ========================================================= */

/* Container flex adjustment */
.miner-detail-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 40px auto;
  gap: 40px;
  padding: 0 20px;
}

/* Left: image area */
.miner-detail-image {
  flex: 0 0 40%;
  text-align: center;
}

.miner-detail-image img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

/* Right: specs area */
.miner-detail-specs {
  flex: 1;
  min-width: 320px;
}

.miner-detail-specs table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.miner-detail-specs th,
.miner-detail-specs td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #ddd;
}

.miner-detail-specs th {
  width: 40%;
}

/* ✅ Responsiveness */
@media (max-width: 992px) {
  .miner-detail-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .miner-detail-image,
  .miner-detail-specs {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .miner-detail-image img {
    max-width: 80%;
  }

  .miner-detail-specs table {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .miner-detail-wrapper {
    gap: 24px;
  }

  .miner-detail-specs table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .miner-detail-specs th,
  .miner-detail-specs td {
    font-size: 14px;
    padding: 10px;
  }

  h1 {
    font-size: 1.8em !important;
    padding: 0 10px;
  }

  .elementor-button {
    padding: 10px 20px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 480px) {
  .miner-detail-specs table {
    font-size: 13px;
  }

  .miner-detail-image img {
    max-width: 100%;
  }

  .elementor-button {
    width: 100%;
    text-align: center;
  }
}

/* =========================================================
   💳 Miner Payment & Query Form Responsive Styling
   ========================================================= */

/* Main wrapper */
.miner-payment-wrapper {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 30px;
  border-radius: 12px;
  max-width: 800px;
  margin: 40px auto;
}

.miner-payment-wrapper h2 {
  text-align: center;
  color: #2A5DD3;
  font-size: 1.8em;
  margin-bottom: 25px;
}

/* Miner details box */
.miner-info-box {
  background: #f8f9ff;
  padding: 15px;
  border: 1px solid #dce3ff;
  border-radius: 10px;
  margin-bottom: 25px;
  font-size: 1em;
}

.miner-info-box strong {
  color: #222;
}

/* Bank details box */
.bank-details-box {
  background: #f0f7ff;
  border: 1px solid #d0e3ff;
  padding: 15px;
  border-radius: 10px;
  margin: 20px 0;
}

.bank-details-box h3 {
  margin-top: 0;
  color: #2A5DD3;
}

.bank-details-box p {
  margin: 0 0 10px;
  color: #333;
  line-height: 1.5;
}

/* Form fields */
.miner-payment-wrapper form label {
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

.miner-payment-wrapper input[type="text"],
.miner-payment-wrapper input[type="email"],
.miner-payment-wrapper input[type="file"],
.miner-payment-wrapper textarea {
  width: 100%;
  padding: 10px;
  margin: 5px 0 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  box-sizing: border-box;
}

/* Buttons */
.miner-payment-wrapper button {
  background: #2A5DD3;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

.miner-payment-wrapper button:hover {
  background: #1f4cb2;
}

/* =============== RESPONSIVE BREAKPOINTS =============== */

@media (max-width: 768px) {
  .miner-payment-wrapper {
    padding: 20px;
    margin: 20px auto;
  }

  .miner-payment-wrapper h2 {
    font-size: 1.5em;
  }

  .miner-info-box,
  .bank-details-box {
    font-size: 0.95em;
  }

  .miner-payment-wrapper button {
    width: 100%;
    text-align: center;
    font-size: 1em;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .miner-payment-wrapper {
    padding: 15px;
  }

  .miner-payment-wrapper h2 {
    font-size: 1.3em;
  }

  .miner-payment-wrapper form label {
    font-size: 0.95em;
  }

  .miner-payment-wrapper input,
  .miner-payment-wrapper textarea {
    font-size: 0.95em;
  }

  .bank-details-box,
  .miner-info-box {
    padding: 12px;
  }
}

/* =========================================
   🧱 F2Pool Miners Shop Responsive Styles
   ========================================= */

/* Base layout refinements */
.miners-shop-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* Card structure */
.miner-card {
  flex: 1 1 calc(25% - 20px);
  max-width: 280px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: #222;
}
.miner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Image handling */
.miner-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  margin-bottom: 12px;
  position: relative;
}
.miner-card img {
  max-width: 100%;
  height: auto;
  max-height: 150px;
  border-radius: 4px;
  background: #fff;
}
.image-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 150px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  text-align: center;
  padding: 10px;
}

/* Load More button */
.load-more-container {
  text-align: center;
  margin-top: 25px;
}
#load-more-miners {
  background: #2a5dd3;
  color: #fff;
  padding: 10px 25px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
}
#load-more-miners:hover {
  background: #1e49b0;
}

/* ===============================
   📱 Responsive Breakpoints
   =============================== */

/* --- Tablets --- */
@media (max-width: 1024px) {
  .miner-card {
    flex: 1 1 calc(33.333% - 20px);
    max-width: 320px;
  }
  .miner-image-container {
    height: 140px;
  }
}

/* --- Large Phones --- */
@media (max-width: 768px) {
  .miner-card {
    flex: 1 1 calc(50% - 20px);
    max-width: 100%;
  }
  .miner-image-container {
    height: 130px;
  }
  .miner-card h3 {
    font-size: 15px;
  }
  #load-more-miners {
    width: 100%;
    max-width: 320px;
  }
}

/* --- Small Phones --- */
@media (max-width: 480px) {
  .miner-card {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 15px;
  }
  .miner-card h3 {
    font-size: 14px;
    line-height: 1.3em;
  }
  .miner-image-container {
    height: 120px;
  }
  .miners-shop-grid {
    gap: 15px;
  }
}

/* Force full width cards on mobile */
@media (max-width: 600px) {
  .miners-shop-grid .miner-card {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    padding: 15px !important;
  }

  .miner-image-container {
    height: 120px !important;
  }

  .miner-card h3 {
    font-size: 14px !important;
    line-height: 1.3em !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .miners-shop-grid {
    gap: 15px !important;
  }
}

