/* =========================================================
   WPPlanit Remote Events – BASE (source of truth)
   - Grid/columns obey --cols ALWAYS
   - Month grouping never breaks grid
   - Card structure + consistent vertical rhythm
   - Skins should NOT override layout containers
   ========================================================= */

   .wpplanit-remote-wrap{
    /* Layout tokens */
    --cols: 3;              /* fallback */
    --gap: 16px;
    --radius: 14px;
    --thumb: 110px;
    --colgap: 14px;
  
    /* Rhythm tokens (controls consistent card height) */
    --title-lines: 2;
    --title-lh: 1.25;
    --meta-lh: 1.35;
  
    /* Default fallbacks (skins override these) */
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --bg: #ffffff;
    --soft: #f9fafb;
  
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text);
  }
  
  /* ---------- Toolbar layout ---------- */
  .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);
  }
  
  /* Base select styling (skins may tweak border/shadow) */
  .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 layout ---------- */
  .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 LAYOUT (cols source of truth)
     ========================================================= */
  .wpplanit-remote-wrap .wpr-grid{
    display:grid;
    gap:var(--gap);
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    align-items:start;
  }
  
  /* Month wrapper must not become a layout container */
  .wpplanit-remote-wrap .wpr-month-grid{
    display: contents;
  }
  
  /* Month separator always spans across columns */
  .wpplanit-remote-wrap .wpr-month-separator{
    grid-column: 1 / -1;
    width: 100%;
  }
  
  /* =========================================================
     CARD STRUCTURE (layout invariant)
     ========================================================= */
  .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;
    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;
  }
  
  /* Body layout */
  .wpplanit-remote-wrap .wpr-body{
    display:grid;
    gap:8px;
    min-width:0;
  }
  
  /* Title */
  .wpplanit-remote-wrap .wpr-title{
    margin:0;
    font-size:16px;
    font-weight:400;
    line-height: var(--title-lh);
    min-height: calc(var(--title-lh) * 1em * var(--title-lines));
  }
  
  /* Title link clamp */
  .wpplanit-remote-wrap .wpr-title a{
    color:inherit;
    text-decoration:none;
    display:-webkit-box;
    -webkit-line-clamp: var(--title-lines);
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
  
  .wpplanit-remote-wrap .wpr-title a:hover{
    text-decoration:underline;
  }
  
  /* Meta lines */
  .wpplanit-remote-wrap .wpr-line{
    font-size:13px;
    color:var(--muted);
    line-height: var(--meta-lh);
  }

  .wpplanit-remote-wrap .wpr-post-meta{
    opacity:.82;
  }

  .wpplanit-remote-wrap .wpr-post-likes{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-weight:500;
    color:var(--text);
  }

  .wpplanit-remote-posts .wpr-post-card{
    display:flex;
    flex-direction:column;
    gap:12px;
  }

  .wpplanit-remote-posts .wpr-post-card .wpr-thumb{
    width:100%;
    aspect-ratio:16 / 9;
    border-radius:12px;
  }

  .wpplanit-remote-posts .wpr-post-card .wpr-body{
    gap:7px;
  }

  .wpplanit-remote-posts[style*="--cols:1"] .wpr-post-card,
  .wpplanit-remote-posts[style*="--cols: 1"] .wpr-post-card{
    display:grid;
    grid-template-columns: var(--thumb) 1fr;
    column-gap: var(--colgap);
    gap:0 var(--colgap);
  }

  .wpplanit-remote-posts[style*="--cols:1"] .wpr-post-card .wpr-thumb,
  .wpplanit-remote-posts[style*="--cols: 1"] .wpr-post-card .wpr-thumb{
    width:var(--thumb);
    aspect-ratio:1 / 1;
  }

  .wpplanit-remote-wrap .wpr-heart{
    color:var(--wpr-accent, #ff2b8c);
    font-size:13px;
    line-height:1;
  }
  
  /* Reserve one line for date + one line for location/price */
  .wpplanit-remote-wrap .wpr-start{
    min-height: calc(var(--meta-lh) * 1em);
  }
  
  .wpplanit-remote-wrap .wpr-cost-loc{
    display:inline-flex;
    align-items:center;
    gap:6px;
    width:auto;
    justify-content:flex-start;
    flex-wrap:nowrap;
    min-width:0;
    min-height: calc(var(--meta-lh) * 1em);
  }
  
  .wpplanit-remote-wrap .wpr-country{
    min-width:0;
    flex:0 1 auto;
    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;
    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 */
  .wpplanit-remote-wrap .wpr-badge{
    display:inline-flex !important;
    align-items:center !important;
    padding:6px 10px !important;
    border-radius:999px !important;
    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;
  }
  
  /* Title dot support */
  .wpplanit-remote-wrap .wpr-title a{
    display:inline-flex;
    align-items:center;
    gap:8px;
  }
  
  .wpplanit-remote-wrap .wpr-title-dot{
    width:8px;
    height:8px;
    border-radius:999px;
    background:transparent;
    flex:0 0 auto;
  }
  
  /* ---------- Mobile ---------- */
  @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%;
    }
    .wpplanit-remote-wrap .wpr-country{
      max-width:none;
    }
  }
  
  /* Force stacked layout on mobile */
  @media (max-width: 767px){
    .wpplanit-remote-wrap{
      --cols: 1 !important;
    }
  }
  
