/* =========================================================
   WPPlanit Remote Events – clean, responsive card layout
   ========================================================= */

   .wpplanit-remote-wrap{
    --gap: 16px;
    --radius: 14px;
    --border: #e5e7eb;
    --text: #6b7280;
    --muted: #6b7280;
    --bg: #ffffff;
    --soft: #f9fafb;
  
    --thumb: 110px;
    --colgap: 14px;
  
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text);
  }
  
  /* ---------- Toolbar ---------- */
  .wpplanit-remote-wrap .wpr-toolbar{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    margin:0 0 14px;
    flex-wrap:wrap;
  }
  .wpplanit-remote-wrap .wpr-label{
    font-size:14px;
    color:var(--muted);
  }
  .wpplanit-remote-wrap .wpr-select{
    appearance:none;
    -webkit-appearance:none;
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:12px;
    padding:10px 36px 10px 12px;
    font-size:14px;
    line-height:1.1;
    min-width:220px;
    box-shadow:0 1px 0 rgba(0,0,0,.02);
    background-image:
      linear-gradient(45deg, transparent 50%, var(--muted) 50%),
      linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
      calc(100% - 18px) 50%,
      calc(100% - 12px) 50%;
    background-size:6px 6px, 6px 6px;
    background-repeat:no-repeat;
  }
  .wpplanit-remote-wrap .wpr-select:focus{
    outline:none;
    border-color:#94a3b8;
    box-shadow:0 0 0 3px rgba(148,163,184,.25);
  }
  
  /* ---------- Loading/empty ---------- */
  .wpplanit-remote-wrap .wpr-loading,
  .wpplanit-remote-wrap .wpr-empty{
    padding:18px;
    border:1px dashed var(--border);
    border-radius:var(--radius);
    background:var(--soft);
    color:var(--muted);
    font-size:14px;
  }
  
  /* ---------- Grid ---------- */
/* Grid should define the columns */
.wpplanit-remote-wrap .wpr-grid{
  display:grid;
  gap:var(--gap);
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
}

/* Month wrapper should NOT be a grid anymore (so it doesn't break columns) */
.wpplanit-remote-wrap .wpr-month-grid{
  display: contents;
}
  
  /* ---------- Card ---------- */
  .wpplanit-remote-wrap .wpr-card{
    display:grid;
    grid-template-columns: var(--thumb) 1fr;
    column-gap: var(--colgap);
    padding:14px;
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:var(--bg);
    box-shadow:0 6px 20px rgba(0,0,0,.05);
    overflow:visible; /* don’t clip badge */
    transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  }
  .wpplanit-remote-wrap .wpr-card:hover{
    transform:translateY(-1px);
    border-color:#d1d5db;
    box-shadow:0 10px 30px rgba(0,0,0,.07);
  }
  
  /* Thumb */
  .wpplanit-remote-wrap .wpr-thumb{
    display:block;
    width:var(--thumb);
    border-radius:12px;
    overflow:hidden;
    background:#f3f4f6;
    aspect-ratio:1 / 1;
  }
  .wpplanit-remote-wrap .wpr-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }
  
  /* If no image, become single column */
  .wpplanit-remote-wrap .wpr-card:not(:has(.wpr-thumb)){
    grid-template-columns:1fr;
  }
  
  /* Body */
  .wpplanit-remote-wrap .wpr-body{
    display:grid;
    gap:8px;
    min-width:0;
  }
  .wpplanit-remote-wrap .wpr-title{
    margin:0;
    font-size:16px;
    line-height:1.25;
    font-weight:700;
  }
  .wpplanit-remote-wrap .wpr-title a{
    color:inherit;
    text-decoration:none;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
  .wpplanit-remote-wrap .wpr-title a:hover{
    text-decoration:underline;
  }
  .wpplanit-remote-wrap .wpr-line{
    font-size:13px;
    color:var(--muted);
    line-height:1.35;
  }
  
  /* Price + location: never overflow */
  .wpplanit-remote-wrap .wpr-cost-loc{
    display: inline-flex;
    align-items: center;
    gap: 6px;          /* spacing between country, dot, price */
    width: auto;       /* IMPORTANT: don't stretch the row */
    justify-content: flex-start; /* IMPORTANT */
    flex-wrap: nowrap;
    min-width: 0;
  }
  .wpplanit-remote-wrap .wpr-country{
    min-width: 0;
    flex: 0 1 auto;      /* can shrink */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .wpplanit-remote-wrap .wpr-sep{
    flex:0 0 auto;
  }
  .wpplanit-remote-wrap .wpr-price{
    flex:0 0 auto;   /* keep visible */
    white-space:nowrap;
    font-weight:400;
    font-size: 12px;
    color:var(--text);
  }
  
  /* Countdown */
  .wpplanit-remote-wrap .wpr-countdown{
    font-style:italic;
  }
  
  /* Bottom divider + badge row (aligned under the text column) */
  .wpplanit-remote-wrap .wpr-bottom{
    grid-column:1 / -1;
    padding-left:calc(var(--thumb) + var(--colgap));
    margin-top:10px;
  }
  .wpplanit-remote-wrap .wpr-divider{
    height:1px;
    background:var(--border);
    margin:10px 0 12px;
  }
  
  /* Badge pill (force even on mobile / Divi overrides) */
/* Badge pill (dynamic background allowed) */
.wpplanit-remote-wrap .wpr-badge{
  display: inline-flex !important;
  align-items: center !important;

  padding: 6px 10px !important;
  border-radius: 999px !important;

  /* fallback color if JS doesn't set one */
  background-color: var(--badge-bg, #6d28d9);
  color: #fff !important;

  font-weight: 400 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  letter-spacing: .4px !important;

  border: 0 !important;
  text-decoration: none !important;
  white-space: nowrap !important;

  box-shadow: none !important;
  background-image: none !important;
}
  /* ---------- Mobile tweaks ---------- */
  @media (max-width: 520px){
    .wpplanit-remote-wrap{
      --thumb: 88px;
      --colgap: 12px;
    }
    .wpplanit-remote-wrap .wpr-card{
      padding:12px;
    }
    .wpplanit-remote-wrap .wpr-select{
      min-width:100%;
    }
  
    /* IMPORTANT: don’t cap the location width here (it can push price off) */
    .wpplanit-remote-wrap .wpr-country{
      max-width:none;
    }
  }
  
  /* ===== Force stacked layout on mobile ===== */
@media (max-width: 767px){
  .wpplanit-remote-wrap{
    --cols: 1 !important;
  }
