/* Shared desktop sidebar outer width: 400px, including the homepage. */
body.riderpress-ui{--rp-desktop-columns:minmax(0,1fr) 400px;--rp-desktop-column-gap:32px}
@media(min-width:1001px){
 body.riderpress-ui :is(.rp-home-opening.has-calendar,.rp-home-lower.has-sidebar,.rp-news-layout,.rp-agenda-layout,.rp-club-directory.rp-agenda-layout,.rp-routes-layout,.rp-tv-layout,.rp-detail-layout){grid-template-columns:var(--rp-desktop-columns)!important;column-gap:var(--rp-desktop-column-gap)!important}
 body.riderpress-ui .rp-routes-layout{grid-template-areas:"main search"!important;grid-template-rows:auto;align-items:start}
 body.riderpress-ui .rp-route-main-column{grid-area:main;display:flex;flex-direction:column;gap:16px;min-width:0}
 body.riderpress-ui .rp-route-main-column>.rp-route-invitation,body.riderpress-ui .rp-route-main-column>.rp-route-results{margin-top:0;min-width:0}
 body.riderpress-ui :is(.rp-news-sidebar,.rp-route-sidebar,.rp-agenda-sidebar,.rp-tv-sidebar,.rp-tv-detail-sidebar,.rp-detail-layout>.rp-latest){width:100%;max-width:none;min-width:0;box-sizing:border-box;justify-self:stretch}
 body.riderpress-ui .rp-video-search-jump{display:none}
 body.riderpress-ui .rp-route-search .rp-directory-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.riderpress-ui :is(.rp-route-search,.rp-video-filter,.rp-news-filter,.rp-map-card){width:100%;max-width:none;min-width:0;box-sizing:border-box}
 body.riderpress-ui :is(.rp-agenda-sidebar,.rp-tv-sidebar,.rp-news-sidebar,.rp-route-sidebar,.rp-detail-layout>.rp-latest) :is(iframe,.rp-club-location){width:100%;max-width:100%;box-sizing:border-box}
 body.riderpress-ui :is(.rp-route-static-map,.rp-map-card){max-width:100%;min-width:0}
 body.riderpress-ui .rp-route-static-map img{max-width:100%;height:auto}
}

/* Search controls keep a rectangular shape, including native iOS selects. */
body.riderpress-ui :is(.rp-directory-filters,.rp-filters,.rp-news-filter,.rp-video-filter) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){border-radius:0!important;-webkit-border-radius:0!important;min-width:0;max-width:100%;box-sizing:border-box}
body.riderpress-ui :is(.rp-directory-filters,.rp-filters,.rp-news-filter,.rp-video-filter) select{-webkit-appearance:none;appearance:none;padding-right:28px;background-image:linear-gradient(45deg,transparent 50%,#f4c400 50%),linear-gradient(135deg,#f4c400 50%,transparent 50%);background-position:calc(100% - 15px) 50%,calc(100% - 10px) 50%;background-size:5px 5px;background-repeat:no-repeat}
body.riderpress-ui .rp-filters input[type=date]{-webkit-appearance:none;appearance:none;width:100%;min-inline-size:0}
@media(max-width:720px){
 /* Flatten only directory wrappers to put search/map before cards, ads after. */
 body.riderpress-ui :is(.rp-routes-layout,.rp-club-directory.rp-agenda-layout,.rp-agenda-layout,.rp-news-layout,.rp-tv-layout){display:flex!important;flex-direction:column;gap:20px!important}
 body.riderpress-ui :is(.rp-route-main-column,.rp-route-sidebar,.rp-agenda-main,.rp-agenda-sidebar,.rp-news-sidebar,.rp-tv-sidebar){display:contents!important}
 body.riderpress-ui :is(.rp-route-search,.rp-agenda-search-panel,.rp-news-filter,.rp-video-filter){order:0!important;width:100%;margin:0!important}
 body.riderpress-ui :is(.rp-agenda-sidebar>.rp-map-card){order:1!important;width:100%;margin:0}
 body.riderpress-ui :is(.rp-route-results,.rp-club-grid,.rp-agenda-main>.rp-event-list,.rp-agenda-main>.rp-notice,.rp-agenda-main>.rp-pagination,.rp-news-results,.rp-tv-grid){order:2!important;width:100%;min-width:0}
 body.riderpress-ui :is(.rp-route-sidebar,.rp-agenda-sidebar,.rp-news-sidebar,.rp-tv-sidebar)>.rp-ad-slot{order:3!important;width:100%}
 body.riderpress-ui .rp-route-invitation{order:4!important;width:100%}
 body.riderpress-ui :is(.rp-news-search-jump,.rp-video-search-jump){display:none!important}
}

/* Constrain iOS date controls to the news panel's inner grid track. */
body.riderpress-ui .rp-news-filter form{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%}
body.riderpress-ui .rp-news-filter label{min-width:0;max-width:100%;box-sizing:border-box}
body.riderpress-ui .rp-news-filter input[type=date]{display:block;-webkit-appearance:none;appearance:none;width:100%!important;max-width:100%!important;min-width:0!important;min-inline-size:0!important;box-sizing:border-box!important}
body.riderpress-ui .rp-news-filter input[type=date]::-webkit-date-and-time-value{min-width:0;text-align:left}
/* Actions span the event card, rather than inheriting the narrow poster track. */
body.riderpress-ui .rp-agenda-event>.rp-agenda-event-actions{grid-column:1/-1!important;justify-self:stretch;min-width:0;width:100%!important}
@media(min-width:721px){
 body.riderpress-ui .rp-agenda-event>.rp-agenda-event-actions{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:10px;align-items:stretch}
 body.riderpress-ui .rp-agenda-event>.rp-agenda-event-actions>.rp-btn{display:inline-flex;width:auto!important;flex:0 1 auto;min-width:0;margin:0!important;align-items:center;justify-content:center;white-space:normal}
}
/* Club contacts run left to right, wrapping as needed within the 400px sidebar. */
body.riderpress-ui .rp-club-contact .rp-club-links{display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:stretch}
body.riderpress-ui .rp-club-contact .rp-club-links>.rp-btn{display:inline-flex;flex:0 1 auto;width:auto;min-width:0;min-height:44px;padding:10px 12px;align-items:center;justify-content:center;white-space:normal}

/* Keep actions immediately after the countdown in the information column. */
body.riderpress-ui .rp-agenda-event .rp-event-info .rp-agenda-tools{display:flex!important;flex-direction:column;align-items:stretch;gap:10px;margin-top:12px}
body.riderpress-ui .rp-agenda-event .rp-event-info .rp-event-days-left{flex:none;margin:0}
body.riderpress-ui .rp-agenda-event .rp-event-info .rp-agenda-event-actions{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:10px;width:100%;min-width:0;margin:0;align-items:stretch}
body.riderpress-ui .rp-agenda-event .rp-event-info .rp-agenda-event-actions>.rp-btn{width:auto!important;min-width:0;flex:0 1 auto;margin:0!important;grid-column:auto!important;white-space:normal}

/* Visual TV cards share the same style in the archive and related blocks. */
body.riderpress-ui .rp-tv-visual-card{display:flex;flex-direction:column;min-width:0;height:100%}
body.riderpress-ui .rp-tv-card-media{display:block;position:relative;aspect-ratio:16/9;background:#101213;overflow:hidden}
body.riderpress-ui .rp-tv-card-media img{display:block;width:100%;height:100%;object-fit:cover}
body.riderpress-ui .rp-tv-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:58px;height:48px;background:#f4c400;color:#050505;transition:transform .18s ease}
body.riderpress-ui .rp-tv-card-media:hover .rp-tv-play{transform:translate(-50%,-50%) scale(1.08)}
body.riderpress-ui .rp-tv-duration{position:absolute;right:10px;bottom:10px;background:#050505;color:#fff;padding:4px 7px;font-size:13px}
body.riderpress-ui .rp-tv-visual-card>.rp-card-body{display:flex;flex-direction:column;flex:1;height:auto;min-width:0}
body.riderpress-ui .rp-tv-visual-card .rp-tv-view{align-self:flex-start;margin-top:auto;background:#f4c400;color:#050505;max-width:100%;white-space:normal}
body.riderpress-ui .rp-tv-visual-card .rp-card-body>p{margin-bottom:20px}
body.riderpress-ui .rp-tv-related{margin-top:28px;min-width:0}
body.riderpress-ui .rp-tv-related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
body.riderpress-ui .rp-tv-related-grid h3{font-size:18px;line-height:1.35}
body.riderpress-ui .rp-tv-related-grid p{font-size:14px;line-height:1.5}
body.riderpress-ui .rp-tv-related-grid .rp-card-body{padding:14px}
@media(max-width:720px){body.riderpress-ui .rp-tv-related-grid{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){body.riderpress-ui .rp-tv-play{transition:none}}

body.riderpress-ui .rp-club-editorial-grid>.rp-card{display:flex;flex-direction:column;height:100%;min-width:0}
body.riderpress-ui .rp-club-editorial-grid>.rp-card>.rp-card-body{display:flex;flex-direction:column;flex:1;height:auto;min-width:0}
body.riderpress-ui .rp-club-editorial-grid .rp-card-body>.rp-btn{align-self:flex-start;margin-top:auto;max-width:100%;white-space:normal}

/* Consistent contact facts and equal-sized links within club profiles. */
body.riderpress-ui .rp-club-contact>.rp-club-founded{color:#f4c400;font-weight:700}
body.riderpress-ui .rp-club-contact .rp-club-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch}
body.riderpress-ui .rp-club-contact .rp-club-links>.rp-btn{display:flex;align-items:center;justify-content:center;width:100%;height:48px;min-height:48px;min-width:0;max-width:100%;padding:8px 6px;box-sizing:border-box;font-size:13px;line-height:1.2;text-align:center;white-space:normal;overflow-wrap:anywhere;margin:0}
@media(max-width:360px){body.riderpress-ui .rp-club-contact .rp-club-links{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Mobile event cards: normal text flow beside poster, independent action row. */
@media(max-width:720px){
 body.riderpress-ui .rp-agenda-event{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;padding:12px!important;align-items:start}
 body.riderpress-ui .rp-agenda-event:has(>.rp-event-poster){grid-template-columns:minmax(0,1fr)!important}
 body.riderpress-ui .rp-agenda-event>.rp-event-poster{display:block;grid-column:1!important;grid-row:auto!important;width:auto!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:320px!important;object-fit:contain;justify-self:center;align-self:start;margin:0!important}
 body.riderpress-ui .rp-agenda-event>.rp-event-info{display:block!important;grid-column:1!important;grid-row:auto!important;min-width:0;width:100%}
 body.riderpress-ui .rp-agenda-event .rp-event-info>h3{margin:0 0 12px;font-size:20px;line-height:1.3}
 body.riderpress-ui .rp-agenda-event .rp-event-info>p{margin:10px 0;overflow-wrap:anywhere}
 body.riderpress-ui .rp-agenda-event .rp-event-info .rp-agenda-tools{display:flex!important;flex-direction:column;gap:12px;margin-top:12px}
 body.riderpress-ui .rp-agenda-event .rp-event-info .rp-event-days-left{margin:0;flex:none}
 body.riderpress-ui .rp-agenda-event .rp-event-info .rp-agenda-event-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px;width:100%;max-width:100%;margin:0;min-width:0}
 body.riderpress-ui .rp-agenda-event .rp-event-info .rp-agenda-event-actions>.rp-btn{display:flex;width:100%!important;max-width:100%!important;min-width:0!important;height:46px;min-height:46px;margin:0!important;padding:6px 4px!important;font-size:11px!important;line-height:1.2;letter-spacing:0;white-space:normal;overflow-wrap:anywhere;align-items:center;justify-content:center;text-align:center;box-sizing:border-box}
}

/* Keep the like count inside its button beside the heart. */
body.riderpress-ui .rp-share>button.rp-like{display:inline-flex!important;flex-direction:row!important;align-items:center;justify-content:center;gap:8px;width:auto!important;min-width:76px;height:44px;min-height:44px;padding:8px 12px;box-sizing:border-box}
body.riderpress-ui .rp-share>button.rp-like>[data-rp-like-count]{display:inline-block!important;position:static!important;float:none!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;line-height:1;font-size:15px;transform:none!important}
body.riderpress-ui .rp-share>button.rp-like>svg{display:block;flex:0 0 22px;width:22px;height:22px}
body.riderpress-ui .rp-share>.rp-share-calendar-row{display:inline-flex;flex-direction:row;flex-wrap:nowrap;gap:10px;max-width:100%}
body.riderpress-ui .rp-share>.rp-share-calendar-row>.rp-calendar-action{display:inline-flex;align-items:center;justify-content:center;width:auto;height:auto;min-height:44px;padding:10px 12px;white-space:normal;text-align:center;box-sizing:border-box;font-size:13px}
@media(max-width:720px){
 body.riderpress-ui .rp-share>.rp-share-calendar-row{flex:0 0 100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
 body.riderpress-ui .rp-share>.rp-share-calendar-row>.rp-calendar-action{width:100%;min-width:0;margin:0;padding:10px 6px;font-size:12px}
}
