/* Ad blocks follow the width of their owning column, not the source image size. */
.riderpress-ui .rp-ad-slot,
.riderpress-ui .rp-reference-home .rp-home-ad-column>.rp-ad-slot{
  box-sizing:border-box;
  width:100%!important;
  max-width:none!important;
  min-width:0;
  margin-left:0!important;
  margin-right:0!important;
  justify-self:stretch;
  align-self:start;
}
/* Standalone top/footer ads share the same outer gutters as .rp-wrap. */
.riderpress-ui> .rp-ad-slot,
.riderpress-ui main:not(.rp-wrap)> .rp-ad-slot{
  width:min(var(--rp-max),calc(100% - 34px))!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.riderpress-ui .rp-ad-slot .rp-ad-slides{width:100%;max-width:100%;min-width:0}
.riderpress-ui .rp-ad-slot .rp-ad-slide img{max-width:100%;object-fit:contain}
.rp-news-sidebar,.rp-route-sidebar,.rp-agenda-sidebar,.rp-tv-sidebar,.rp-tv-detail-sidebar{min-width:0}
@media(max-width:720px){
 .riderpress-ui> .rp-ad-slot,
 .riderpress-ui main:not(.rp-wrap)> .rp-ad-slot{width:calc(100% - 20px)!important}
}

/* Remove decorative panel edges while preserving their dimensions and spacing. */
.riderpress-ui :is(.rp-card,.rp-news-card,.rp-quick-card,.rp-mini,.rp-panel,.rp-event-row,.rp-partner-box,.rp-news-filter,.rp-route-search,.rp-map-card,.rp-detail-card,.rp-event-information,.rp-form-card,.rp-ad-slot,.rp-route-static-map),
.riderpress-ui .rp-route-invitation p,
.riderpress-ui .rp-route-card-stats>div,
.riderpress-ui .rp-info-grid>div{
  border-color:transparent!important;
}

/* Mobile carousel height follows the selected creative instead of cropping a tall image. */
@media(max-width:720px){
 .riderpress-ui .rp-ad-slot .rp-ad-slides{
  display:block;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
 }
 .riderpress-ui .rp-ad-slot .rp-ad-slide{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
 }
 .riderpress-ui .rp-ad-slot .rp-ad-slide[hidden]{display:none!important}
 .riderpress-ui .rp-ad-slot .rp-ad-slide img{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
 }
 .riderpress-ui .rp-ad-slot .rp-ad-controls{
  position:static!important;
  clear:both;
  margin-top:12px;
 }
}

/* Horizontal artwork stays within 970 x 250 while the panel follows page gutters.
   Limit the ratio-bearing viewport, not just the image, to avoid empty height. */
@media(min-width:721px){
 .riderpress-ui .rp-ad-slot-format-horizontal .rp-ad-slides{
  display:block;
  width:100%;
  max-width:970px;
  height:auto!important;
  min-height:0!important;
  max-height:250px;
  aspect-ratio:970 / 250;
  margin-inline:auto;
 }
 .riderpress-ui .rp-ad-slot-format-horizontal .rp-ad-slide{
  width:100%;
  height:100%;
  min-height:0;
 }
 .riderpress-ui .rp-ad-slot-format-horizontal .rp-ad-slide[hidden]{display:none!important}
 .riderpress-ui .rp-ad-slot-format-horizontal .rp-ad-slide img{
  display:block;
  width:100%;
  height:100%;
  max-height:250px;
  object-fit:contain;
 }
 .riderpress-ui .rp-ad-slot-format-horizontal .rp-ad-controls{
  position:static;
  margin-top:12px;
 }
}

/* Final header spacing overrides legacy !important safe-area declarations. */
body.riderpress-ui .rp-topbar{
 padding-top:32px!important;
 padding-top:calc(32px + env(safe-area-inset-top,0px))!important;
 padding-bottom:8px!important;
 box-sizing:border-box;
}
@media(max-width:720px){
 body.riderpress-ui .rp-topbar{
  padding-top:20px!important;
  padding-top:calc(20px + env(safe-area-inset-top,0px))!important;
  padding-bottom:6px!important;
 }
}

/* Footer share actions wrap without forcing calendar links into square icon buttons. */
.riderpress-ui .rp-share{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.riderpress-ui .rp-share a.rp-calendar-action{display:inline-flex;width:auto;height:auto;min-height:44px;align-items:center;justify-content:center;padding:10px 14px;white-space:normal}

.riderpress-ui .rp-agenda-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;position:relative;z-index:2}
.riderpress-ui .rp-agenda-tools .rp-save-control{margin:0}
.riderpress-ui .rp-distance-filter{min-width:0;grid-column:1/-1;padding:12px;border:1px solid #333}
.riderpress-ui .rp-distance-filter p{font-size:13px;color:#bbb}

/* Agenda: legible full posters and a continuous information column. */
.riderpress-ui .rp-agenda-event{display:grid;grid-template-columns:minmax(0,1fr)!important;align-items:start;gap:18px;padding:16px}
.riderpress-ui .rp-agenda-event:has(>.rp-event-poster){grid-template-columns:180px minmax(0,1fr)!important}
.riderpress-ui .rp-agenda-event>.rp-event-poster{grid-column:1;grid-row:1;width:180px;height:auto;max-height:320px;object-fit:contain;object-position:top center}
.riderpress-ui .rp-agenda-event>.rp-event-info{grid-column:auto;grid-row:auto;min-width:0}
.riderpress-ui .rp-agenda-event .rp-agenda-tools{margin-top:12px;display:flex;flex-wrap:wrap;gap:10px}
.riderpress-ui .rp-agenda-event .rp-event-days-left{flex:0 0 100%;margin:0;color:var(--rp-yellow,#f4c400)}
.riderpress-ui .rp-agenda-event .rp-event-days-left strong{color:inherit}
.riderpress-ui .rp-distance-inline{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.riderpress-ui .rp-distance-inline>label{flex:0 1 180px;width:180px;min-width:140px}
.riderpress-ui .rp-distance-inline select{width:100%;max-width:180px}
.riderpress-ui .rp-distance-inline>button{flex:0 0 auto;margin:0;min-height:48px}
@media(max-width:720px){
 .riderpress-ui .rp-agenda-event:has(>.rp-event-poster){grid-template-columns:110px minmax(0,1fr)!important;gap:12px;padding:12px}
 .riderpress-ui .rp-agenda-event>.rp-event-poster{width:110px;height:auto;max-height:240px}
 .riderpress-ui .rp-agenda-event .rp-event-info h3{font-size:18px}
 .riderpress-ui .rp-agenda-event .rp-agenda-tools a{font-size:12px;padding:8px}
 .riderpress-ui .rp-distance-inline{gap:8px}
 .riderpress-ui .rp-distance-inline>label{flex:0 1 140px;width:140px}
 .riderpress-ui .rp-distance-inline>button{font-size:12px;padding:10px}
}

/* Override legacy fixed poster sizes, including their !important declarations. */
body.riderpress-ui .rp-agenda-event:has(>.rp-event-poster){grid-template-columns:220px minmax(0,1fr)!important;min-height:330px;align-items:stretch}
body.riderpress-ui .rp-agenda-event>.rp-event-poster{width:220px!important;height:100%!important;max-height:380px!important;min-height:298px;align-self:stretch;object-fit:contain!important;object-position:center!important}
body.riderpress-ui .rp-agenda-event>.rp-event-info{align-self:center;grid-row:auto!important}
body.riderpress-ui .rp-agenda-main .rp-filters>.rp-filter-actions{display:flex;flex-direction:row;flex-wrap:nowrap;gap:10px;grid-column:1/-1;width:100%;align-items:center}
body.riderpress-ui .rp-filter-actions>.rp-btn{flex:0 1 auto;min-width:0;margin:0;white-space:normal;text-align:center}
@media(max-width:720px){
 body.riderpress-ui .rp-agenda-event:has(>.rp-event-poster){grid-template-columns:140px minmax(0,1fr)!important;min-height:270px}
 body.riderpress-ui .rp-agenda-event>.rp-event-poster{width:140px!important;height:100%!important;min-height:240px;max-height:360px!important;grid-row:1!important}
 body.riderpress-ui .rp-filter-actions>.rp-btn{font-size:12px;padding:10px;flex:0 1 auto}
}
@media(max-width:380px){
 body.riderpress-ui .rp-agenda-event:has(>.rp-event-poster){grid-template-columns:120px minmax(0,1fr)!important;gap:10px}
 body.riderpress-ui .rp-agenda-event>.rp-event-poster{width:120px!important}
}

/* A single RiderPress search panel groups all agenda controls. */
body.riderpress-ui .rp-agenda-search-panel{box-sizing:border-box;width:100%;min-width:0;background:#17191b;padding:22px;margin:0 0 20px;border-top:3px solid var(--rp-yellow,#f4c400)}
body.riderpress-ui .rp-agenda-search-panel>.rp-section-title{font-size:24px;color:var(--rp-yellow,#f4c400);margin:0 0 18px;line-height:1.2}
body.riderpress-ui .rp-agenda-search-panel .rp-period-links{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px;padding:0}
body.riderpress-ui .rp-agenda-search-panel .rp-period-links a{font-size:12px;padding:9px 12px;min-height:40px}
body.riderpress-ui .rp-agenda-search-panel .rp-period-links a[aria-current=page]{background:var(--rp-yellow,#f4c400);color:#080808;border-color:var(--rp-yellow,#f4c400)}
body.riderpress-ui .rp-agenda-search-panel .rp-filters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px;margin:0;padding:0;background:transparent;border:0;min-width:0}
body.riderpress-ui .rp-agenda-search-panel .rp-filters>label{width:auto;min-width:0;flex:none;grid-column:auto}
body.riderpress-ui .rp-agenda-search-panel .rp-filters input:not([type=hidden]),body.riderpress-ui .rp-agenda-search-panel .rp-filters select{box-sizing:border-box;max-width:100%;min-height:46px;background:#090b0c;border:1px solid #45484b}
body.riderpress-ui .rp-agenda-search-panel .rp-distance-filter{padding:14px 0 0;margin:4px 0 0;border:0;border-top:1px solid #333;min-width:0}
body.riderpress-ui .rp-agenda-search-panel .rp-distance-filter legend{font-size:14px;color:var(--rp-yellow,#f4c400);font-weight:700;padding:0 10px 0 0}
body.riderpress-ui .rp-agenda-search-panel .rp-distance-filter p{font-size:12px;line-height:1.5;margin:12px 0 0}
body.riderpress-ui .rp-agenda-search-panel .rp-filter-actions{padding-top:4px}
@media(min-width:1400px){body.riderpress-ui .rp-agenda-search-panel .rp-filters{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:540px){
 body.riderpress-ui .rp-agenda-search-panel{padding:16px}
 body.riderpress-ui .rp-agenda-search-panel .rp-filters{grid-template-columns:minmax(0,1fr)!important;gap:12px}
 body.riderpress-ui .rp-agenda-search-panel .rp-period-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body.riderpress-ui .rp-agenda-search-panel .rp-period-links a{font-size:11px;min-width:0}
}

.riderpress-ui .rp-my-province{margin:0 0 18px}
.riderpress-ui .rp-my-province>summary{display:inline-flex;cursor:pointer;list-style:none;color:var(--rp-yellow,#f4c400)}
.riderpress-ui .rp-my-province-options{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding-top:12px}
.riderpress-ui .rp-my-province-options p,.riderpress-ui .rp-my-province-options small{flex-basis:100%;margin:0;line-height:1.5}
.riderpress-ui .rp-my-province-options small{color:#bbb;font-size:12px}

/* Period shortcuts and province action share the same horizontal toolbar. */
body.riderpress-ui .rp-agenda-search-panel .rp-agenda-quick-filters{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;margin-bottom:20px}
body.riderpress-ui .rp-agenda-search-panel .rp-agenda-quick-filters .rp-period-links{display:contents;margin:0}
body.riderpress-ui .rp-agenda-quick-filters .rp-my-province{display:contents;margin:0}
body.riderpress-ui .rp-agenda-quick-filters .rp-my-province>summary{display:inline-flex;align-items:center;min-height:40px;box-sizing:border-box;font-size:12px;padding:9px 12px;list-style:none}
body.riderpress-ui .rp-agenda-quick-filters .rp-my-province>summary::-webkit-details-marker{display:none}
body.riderpress-ui .rp-agenda-quick-filters .rp-my-province-options{flex:0 0 100%;order:2;padding-top:8px}
body.riderpress-ui .rp-agenda-quick-filters .rp-my-province:not([open])>.rp-my-province-options{display:none}

/* Nearby controls and stronger event card hierarchy. */
body.riderpress-ui .rp-agenda-search-panel .rp-distance-filter legend{font-size:24px;line-height:1.25;font-weight:800;color:var(--rp-yellow,#f4c400);padding-right:12px}
body.riderpress-ui .rp-distance-filter .rp-my-province{display:block;margin:4px 0 16px}
body.riderpress-ui .rp-distance-filter .rp-my-province>summary{display:inline-flex;align-items:center;min-height:44px;padding:10px 14px}
body.riderpress-ui .rp-agenda-event .rp-event-info h3{font-size:26px;line-height:1.25;margin-bottom:12px}
body.riderpress-ui .rp-agenda-event .rp-event-info p{font-size:16px!important;line-height:1.55}
body.riderpress-ui .rp-agenda-organizer{margin:12px 0}
body.riderpress-ui .rp-agenda-organizer>span{display:block;font-size:12px;color:var(--rp-yellow,#f4c400);font-weight:700;letter-spacing:.05em}
body.riderpress-ui .rp-agenda-event-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;width:100%}
body.riderpress-ui .rp-agenda-event-actions>.rp-btn{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:0;height:auto;min-height:44px;padding:10px 12px;font-size:13px}
body.riderpress-ui .rp-agenda-event-actions>.rp-agenda-view{background:var(--rp-yellow,#f4c400);color:#080808}
@media(max-width:720px){
 body.riderpress-ui .rp-agenda-event .rp-event-info h3{font-size:21px}
 body.riderpress-ui .rp-agenda-event .rp-event-info p{font-size:15px!important}
 body.riderpress-ui .rp-agenda-event-actions>.rp-btn{font-size:12px;padding:9px}
}

/* Shared 2:1 mobile / partner creative, with legacy artwork contained intact. */
body.riderpress-ui .rp-ad-slot-format-mobile .rp-ad-slides{aspect-ratio:2/1}
@media(max-width:720px){
 body.riderpress-ui .rp-ad-slot .rp-ad-slide img.rp-ad-mobile{aspect-ratio:2/1!important;width:100%!important;height:auto!important;object-fit:contain!important}
}

/* Club profile footer: related content first, compact province logo cards last. */
body.riderpress-ui .rp-province-clubs-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,220px));gap:16px;justify-content:start}
body.riderpress-ui .rp-province-club{min-width:0;background:#101214;padding:14px;box-sizing:border-box}
body.riderpress-ui .rp-province-club>a{display:block;text-decoration:none}
body.riderpress-ui .rp-province-club-logo{height:150px;display:flex;align-items:center;justify-content:center}
body.riderpress-ui .rp-province-club-logo img{display:block;width:100%!important;height:100%!important;max-height:150px!important;object-fit:contain!important;object-position:center}
body.riderpress-ui .rp-province-club h3{font-size:17px;line-height:1.3;margin:12px 0 0}
body.riderpress-ui .rp-club-editorial-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
body.riderpress-ui .rp-club-editorial-grid .rp-card>img{width:100%;height:180px;object-fit:contain}
body.riderpress-ui .rp-club-related-events-list{display:grid;grid-template-columns:minmax(0,1fr)}
@media(max-width:720px){
 body.riderpress-ui .rp-province-clubs-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 body.riderpress-ui .rp-province-club-logo{height:120px}
 body.riderpress-ui .rp-club-editorial-grid{grid-template-columns:minmax(0,1fr)}
}

/* Club invitation follows the site's neutral panel treatment. */
body.riderpress-ui .rp-club-join-cta{background:#17191a;border:0;padding:20px;box-shadow:none}
body.riderpress-ui .rp-club-join-copy strong{color:#f4c400}
body.riderpress-ui .rp-club-join-btn{box-shadow:none}
/* Province, distance and location share one row; expanded details flow below. */
body.riderpress-ui .rp-distance-inline>.rp-my-province{display:contents;margin:0}
body.riderpress-ui .rp-distance-inline>.rp-my-province>summary{display:inline-flex;align-items:center;justify-content:center;align-self:flex-end;min-height:48px;margin:0;list-style:none;box-sizing:border-box}
body.riderpress-ui .rp-distance-inline>.rp-my-province>summary::-webkit-details-marker{display:none}
body.riderpress-ui .rp-distance-inline>.rp-my-province>.rp-my-province-options{order:2;flex:0 0 100%;min-width:0}
body.riderpress-ui .rp-distance-inline>.rp-my-province:not([open])>.rp-my-province-options{display:none}
@media(max-width:720px){body.riderpress-ui .rp-distance-inline{flex-wrap:wrap}body.riderpress-ui .rp-distance-inline>.rp-my-province>summary{font-size:12px;padding:10px}}

body.riderpress-ui .rp-distance-inline>button[data-rp-locate]{text-transform:none}
