:root{
  --bppte-eggplant:#1e0a2e;
  --bppte-eggplant-2:#2d0d45;
  --bppte-eggplant-3:#3d1460;
  --bppte-purple:#5a2080;
  --bppte-gold:#c9a84c;
  --bppte-gold-dark:#9c771f;
  --bppte-gold-light:#f5d97a;
  --bppte-text:#1e0a2e;
  --bppte-muted:#6b5585;
  --bppte-border:#e2daf0;
  --bppte-border-mid:#c4b4dc;
  --bppte-soft:#f8f6fc;
  --bppte-soft-2:#f3f0fa;
  --bppte-white:#ffffff;
  --bppte-green:#1a7a4a;
  --bppte-red:#b83232;
  --bppte-navy:var(--bppte-eggplant);
  --bppte-navy-2:var(--bppte-eggplant-2);
  --bppte-navy-3:var(--bppte-eggplant-3);
}

.bppte-root,
.bppte-root *{
  box-sizing:border-box;
}

/* Fluent Community and common WordPress content wrappers. The stylesheet is only
   loaded on the TeamBPP Events page, so these rules safely release the page width. */
.fc_post_content,
.fcom-page-content,
.fcom-content-area,
.fcom-main-content,
.fcom-wrap,
.fcom-container,
.fluent-community-app,
.fcom-page-body,
.fcom-layout-content,
.fcom_single_page_layout_content,
.fcom-portal-content,
.fcom-page-inner,
.entry-content,
.page-content{
  max-width:100%!important;
  padding-left:0!important;
  padding-right:0!important;
}

.bppte-root{
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
  color:var(--bppte-text);
  background:var(--bppte-soft);
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  line-height:1.45;
  overflow:hidden;
}

.bppte-root a{
  text-decoration:none;
}

.bppte-root button,
.bppte-root select{
  font:inherit;
}

.bppte-root svg{
  display:block;
  width:100%;
  height:100%;
}

.bppte-hero{
  position:relative;
  overflow:hidden;
  min-height:320px;
  color:#fff;
  background:
    linear-gradient(90deg,rgba(30,10,46,.99) 0%,rgba(30,10,46,.96) 45%,rgba(45,13,69,.90) 70%,rgba(30,10,46,.97) 100%),
    radial-gradient(circle at 76% 35%,rgba(201,168,76,.18),transparent 28%),
    linear-gradient(135deg,#1e0a2e 0%,#3d1460 55%,#160820 100%);
  border-bottom:2px solid var(--bppte-gold);
}

.bppte-hero::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:.34;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);
  background-size:52px 52px;
  mask-image:linear-gradient(90deg,transparent 0%,#000 55%,#000 100%);
}

.bppte-hero::after{
  content:"";
  position:absolute;
  right:-140px;
  bottom:-120px;
  width:640px;
  height:420px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:40% 0 0 0;
  transform:skewX(-12deg);
  background:
    linear-gradient(155deg,rgba(255,255,255,.02),rgba(255,255,255,.08)),
    repeating-linear-gradient(90deg,transparent 0 56px,rgba(255,255,255,.05) 57px 58px);
  box-shadow:inset 0 0 80px rgba(0,0,0,.35);
}

.bppte-hero-glow{
  position:absolute;
  z-index:0;
  right:13%;
  top:8%;
  width:380px;
  height:380px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(213,164,59,.17),transparent 68%);
  filter:blur(2px);
}

.bppte-hero-inner{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);
  align-items:center;
  gap:40px;
  width:min(1400px,calc(100% - 64px));
  min-height:320px;
  margin:0 auto;
  padding:42px 0 36px;
}

.bppte-hero-copy{
  max-width:760px;
}

.bppte-hero h1{
  font-family:Montserrat,Inter,ui-sans-serif,sans-serif;
  margin:0 0 8px;
  color:#fff;
  font-size:clamp(36px,5vw,64px);
  font-weight:800;
  letter-spacing:-.04em;
  line-height:1.02;
}

.bppte-hero h2{
  margin:0 0 12px;
  color:var(--bppte-gold);
  font-size:clamp(18px,2.1vw,27px);
  font-weight:700;
  line-height:1.25;
}

.bppte-hero p{
  max-width:660px;
  margin:0;
  color:rgba(255,255,255,.86);
  font-size:clamp(15px,1.45vw,19px);
}

.bppte-hero-benefits{
  display:flex;
  align-items:stretch;
  gap:0;
  margin-top:34px;
}

.bppte-hero-benefits>div{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  padding:0 28px;
  border-left:1px solid rgba(255,255,255,.22);
}

.bppte-hero-benefits>div:first-child{
  padding-left:0;
  border-left:0;
}

.bppte-hero-benefits svg{
  width:35px;
  height:35px;
  flex:0 0 35px;
  color:var(--bppte-gold);
}

.bppte-hero-benefits span{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.bppte-hero-benefits strong{
  color:#fff;
  font-size:15px;
  font-weight:700;
  white-space:nowrap;
}

.bppte-hero-benefits small{
  color:rgba(255,255,255,.76);
  font-size:13px;
}

.bppte-hero-brand{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:220px;
}

.bppte-hero-brand img{
  display:block;
  width:190px;
  height:190px;
  max-width:100%;
  object-fit:contain;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  filter:drop-shadow(0 14px 28px rgba(0,0,0,.24));
}

.bppte-fallback-logo{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:300px;
  height:180px;
  border:1px solid rgba(213,164,59,.18);
  background:rgba(22,8,32,.42);
  box-shadow:0 18px 50px rgba(0,0,0,.28);
  backdrop-filter:blur(4px);
}

.bppte-fallback-logo span{
  color:var(--bppte-gold);
  font-family:Georgia,"Times New Roman",serif;
  font-size:76px;
  line-height:1;
}

.bppte-fallback-logo small{
  margin-top:10px;
  color:rgba(255,255,255,.47);
  font-size:12px;
  letter-spacing:.12em;
}

.bppte-content{
  display:grid;
  grid-template-columns:minmax(0,2.2fr) minmax(290px,.82fr);
  gap:32px;
  width:min(1400px,calc(100% - 64px));
  margin:0 auto;
  padding:38px 0 28px;
}

.bppte-section-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:0 0 18px;
}

.bppte-section-heading h2{
  font-family:Montserrat,Inter,ui-sans-serif,sans-serif;
  margin:0;
  color:var(--bppte-text);
  font-size:24px;
  font-weight:800;
  letter-spacing:-.02em;
}

.bppte-result-count{
  margin:3px 0 0;
  color:var(--bppte-muted);
  font-size:12px;
}

.bppte-filter-label{
  min-width:170px;
}

.bppte-filter{
  width:100%;
  min-height:44px;
  padding:0 42px 0 15px;
  color:var(--bppte-eggplant);
  background:#fff;
  border:1px solid var(--bppte-border);
  border-radius:9px;
  box-shadow:0 2px 8px rgba(30,10,46,.04);
  cursor:pointer;
}

.bppte-event-list{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.bppte-event-card{
  position:relative;
  display:grid;
  grid-template-columns:78px minmax(0,1fr) minmax(280px,320px);
  align-items:center;
  gap:34px;
  min-height:176px;
  padding:40px 52px;
  background:#fff;
  border:1px solid var(--bppte-border);
  border-radius:18px;
  box-shadow:0 5px 18px rgba(30,10,46,.07);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.bppte-event-card:hover{
  transform:translateY(-2px);
  border-color:var(--bppte-border-mid);
  box-shadow:0 12px 28px rgba(30,10,46,.12);
}

.bppte-event-card[hidden]{
  display:none!important;
}

.bppte-event-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:72px;
  height:72px;
  margin-left:2px;
  overflow:hidden;
  color:var(--bppte-gold);
  background:linear-gradient(145deg,#1e0a2e,#3d1460);
  border-radius:50%;
  box-shadow:0 8px 18px rgba(30,10,46,.20);
}

.bppte-event-icon svg{
  width:36px;
  height:36px;
}

.bppte-event-icon.is-custom-image{
  padding:0;
  background:#fff;
  border:2px solid #e3e8ee;
}

.bppte-event-icon.is-custom-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.bppte-event-icon.bppte-type-nat:nth-child(odd),
.bppte-event-card:nth-child(even) .bppte-event-icon{
  color:#fff8e8;
  background:linear-gradient(145deg,#e0b34e,#af7614);
}

.bppte-event-card:nth-child(even) .bppte-event-icon svg{
  color:#fff;
}

.bppte-event-info{
  min-width:0;
}

.bppte-title-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px;
}

.bppte-title-row h3{
  font-family:Montserrat,Inter,ui-sans-serif,sans-serif;
  min-width:0;
  margin:0;
  color:var(--bppte-eggplant);
  font-size:20px;
  font-weight:800;
  letter-spacing:-.015em;
  line-height:1.25;
}

.bppte-badge{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:4px 9px;
  color:#8c6414;
  background:#fbf2dc;
  border-radius:5px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.03em;
  line-height:1;
  text-transform:uppercase;
}

.bppte-badge-biweekly{
  color:#1f7546;
  background:#e8f5ec;
}

.bppte-badge-none{
  color:#60469c;
  background:#efeafa;
}

.bppte-meta-line{
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0;
  color:#4f3d69;
  font-size:14px;
}

.bppte-mini-icon{
  flex:0 0 17px;
  width:17px;
  height:17px;
  color:var(--bppte-eggplant-3);
}

.bppte-video-icon,
.bppte-location-line-icon{
  width:18px;
  height:18px;
}

.bppte-recurrence-pill{
  display:inline-flex;
  margin-top:14px;
  padding:4px 8px;
  color:var(--bppte-eggplant-3);
  background:#efeafa;
  border-radius:4px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
}

.bppte-special-occurrence-pill{
  display:inline-flex;
  margin:14px 0 0 8px;
  padding:4px 8px;
  color:#7b5810;
  background:#fff1c9;
  border:1px solid #e9ca77;
  border-radius:4px;
  font-size:10px;
  font-weight:850;
  letter-spacing:.02em;
}

.bppte-event-actions{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-self:stretch;
  gap:12px;
  padding:8px 0 8px 12px;
}

.bppte-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  min-height:52px;
  padding:13px 22px;
  border-radius:11px;
  font-size:13px;
  font-weight:750;
  text-align:center;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
}

.bppte-btn:hover{
  transform:translateY(-1px);
}

.bppte-btn-primary{
  color:#fff!important;
  background:linear-gradient(135deg,#1e0a2e,#3d1460);
  box-shadow:0 5px 12px rgba(30,10,46,.18);
}

.bppte-btn-primary:hover{
  color:#fff!important;
  background:linear-gradient(135deg,#2d0d45,#5a2080);
  box-shadow:0 8px 18px rgba(30,10,46,.25);
}

.bppte-btn-calendar{
  color:#b37d16!important;
  background:#fff;
  border:1px solid #d9a83f;
}

.bppte-btn-calendar:hover{
  color:#91610c!important;
  background:#fffaf0;
}

.bppte-btn-details{
  color:var(--bppte-eggplant)!important;
  background:#f3f0fa;
  border:1px solid var(--bppte-border-mid);
}

.bppte-btn-details:hover{
  color:var(--bppte-eggplant)!important;
  background:#ebe5f5;
}

.bppte-btn-icon{
  width:18px;
  height:18px;
  flex:0 0 18px;
}

.bppte-side-card{
  margin-bottom:16px;
  padding:21px;
  background:#fff;
  border:1px solid var(--bppte-border);
  border-radius:13px;
  box-shadow:0 5px 18px rgba(30,10,46,.06);
}

.bppte-side-card h3{
  margin:0 0 15px;
  color:var(--bppte-eggplant);
  font-size:16px;
  font-weight:800;
}

.bppte-calendar-nav{
  display:grid;
  grid-template-columns:38px 1fr 38px;
  align-items:center;
  gap:6px;
  margin-bottom:12px;
}

.bppte-calendar-nav button{
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  padding:0;
  color:var(--bppte-eggplant);
  background:transparent;
  border:0;
  border-radius:50%;
  font-size:25px;
  cursor:pointer;
}

.bppte-calendar-nav button:hover{
  background:var(--bppte-soft-2);
}

.bppte-cal-title{
  text-align:center;
  font-size:14px;
}

.bppte-calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:2px;
  text-align:center;
}

.bppte-cal-weekday{
  padding:4px 0 7px;
  color:var(--bppte-muted);
  font-size:9px;
  font-weight:800;
}

.bppte-cal-day{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  aspect-ratio:1;
  min-width:27px;
  color:var(--bppte-eggplant);
  border-radius:50%;
  font-size:12px;
}

.bppte-cal-day.is-outside{
  color:#aeb5bf;
}

.bppte-cal-day.is-today{
  color:#fff;
  background:var(--bppte-navy);
  font-weight:800;
}

.bppte-cal-day.has-event::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:2px;
  width:4px;
  height:4px;
  margin-left:-2px;
  background:var(--bppte-gold);
  border-radius:50%;
}

.bppte-cal-day.is-today.has-event::after{
  background:#fff;
}

.bppte-view-full{
  display:block;
  width:100%;
  min-height:40px;
  margin-top:15px;
  color:var(--bppte-eggplant);
  background:#fff;
  border:1px solid var(--bppte-border-mid);
  border-radius:5px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

.bppte-view-full:hover{
  background:var(--bppte-soft);
}

.bppte-how-card ol{
  display:flex;
  flex-direction:column;
  gap:15px;
  margin:0;
  padding:0;
  list-style:none;
}

.bppte-how-card li{
  display:grid;
  grid-template-columns:32px 1fr;
  align-items:flex-start;
  gap:11px;
}

.bppte-how-card li>span{
  display:flex;
  align-items:center;
  justify-content:center;
  width:31px;
  height:31px;
  color:#7d5810;
  background:#fcf5e6;
  border:1px solid #edd7a5;
  border-radius:50%;
  font-size:13px;
  font-weight:800;
}

.bppte-how-card li p{
  margin:4px 0 0;
  color:#4f3d69;
  font-size:12px;
  line-height:1.45;
}

.bppte-reminder{
  display:flex;
  gap:10px;
  margin-top:17px;
  padding-top:15px;
  color:var(--bppte-gold-dark);
  border-top:1px solid #eceff2;
  font-weight:800;
}

.bppte-reminder span{
  color:var(--bppte-eggplant);
  font-size:12px;
}

.bppte-help-card p,
.bppte-promise-card p{
  margin:0 0 15px;
  color:#4f3d69;
  font-size:12px;
  line-height:1.65;
}

.bppte-support-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 14px;
  color:#fff!important;
  background:var(--bppte-navy);
  border-radius:5px;
  font-size:12px;
  font-weight:800;
}

.bppte-support-btn:hover{
  color:#fff!important;
  background:var(--bppte-eggplant-3);
}

.bppte-promise-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.bppte-promise-title svg{
  width:28px;
  height:28px;
  color:var(--bppte-gold);
}

.bppte-promise-title h3{
  margin:0;
}

.bppte-promise-card strong{
  font-size:12px;
}

.bppte-footer-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  min-height:112px;
  padding:22px max(32px,calc((100% - 1400px)/2));
  color:#fff;
  background:linear-gradient(135deg,#1e0a2e,#3d1460);
  border-top:1px solid rgba(255,255,255,.06);
}

.bppte-footer-left{
  display:flex;
  align-items:center;
  gap:15px;
}

.bppte-footer-icon{
  width:42px;
  height:42px;
  color:var(--bppte-gold);
}

.bppte-footer-left h3{
  margin:0 0 3px;
  color:#fff;
  font-size:18px;
  font-weight:800;
}

.bppte-footer-left p{
  margin:0;
  color:var(--bppte-gold);
  font-size:13px;
}

.bppte-footer-action{
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:270px;
}

.bppte-footer-action a{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:44px;
  padding:10px 18px;
  color:var(--bppte-eggplant)!important;
  background:linear-gradient(90deg,#e2b34c,#c88e25);
  border-radius:5px;
  box-shadow:0 7px 16px rgba(0,0,0,.2);
  font-size:13px;
  font-weight:800;
}

.bppte-footer-action a:hover{
  color:var(--bppte-eggplant)!important;
  background:linear-gradient(90deg,#efc566,#d79a2d);
}

.bppte-footer-action small{
  margin-top:6px;
  color:rgba(255,255,255,.78);
  font-size:10px;
}

.bppte-empty{
  padding:52px 28px;
  text-align:center;
  background:#fff;
  border:1px solid var(--bppte-border);
  border-radius:14px;
}

.bppte-empty-icon{
  width:52px;
  height:52px;
  margin:0 auto 12px;
  color:var(--bppte-gold);
}

.bppte-empty h3{
  margin:0 0 6px;
}

.bppte-empty p{
  margin:0;
  color:var(--bppte-muted);
}

.bppte-login-card{
  max-width:680px;
  margin:40px auto;
  padding:52px 24px;
  text-align:center;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:#fff;
  border:1px solid #e2e6eb;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(30,10,46,.10);
}

.bppte-lock{
  font-size:42px;
}

.bppte-login-card h2{
  margin:12px 0 6px;
}

.bppte-login-card p{
  margin:0 0 18px;
  color:var(--bppte-muted);
}

.bppte-login-card a{
  display:inline-flex;
  padding:11px 24px;
  color:#fff!important;
  background:var(--bppte-eggplant);
  border-radius:7px;
  font-weight:800;
}

@media(max-width:1180px){
  .bppte-content{
    grid-template-columns:minmax(0,1fr) 300px;
    gap:22px;
  }
  .bppte-event-card{
    grid-template-columns:64px minmax(0,1fr) 250px;
    gap:22px;
    padding:30px 34px;
  }
  .bppte-event-icon{
    width:60px;
    height:60px;
    margin-left:0;
  }
  .bppte-event-icon svg{
    width:31px;
    height:31px;
  }
}

@media(max-width:980px){
  .bppte-hero-inner{
    grid-template-columns:1fr;
  }
  .bppte-hero-brand{
    display:none;
  }
  .bppte-content{
    grid-template-columns:1fr;
  }
  .bppte-sidebar{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
  }
  .bppte-side-card{
    margin-bottom:0;
  }
}

@media(max-width:760px){
  .bppte-hero-inner,
  .bppte-content{
    width:min(100% - 30px,1400px);
  }
  .bppte-hero-inner{
    min-height:0;
    padding:34px 0 30px;
  }
  .bppte-hero-benefits{
    display:grid;
    grid-template-columns:1fr;
    gap:15px;
    margin-top:28px;
  }
  .bppte-hero-benefits>div{
    padding:0;
    border-left:0;
  }
  .bppte-section-heading{
    align-items:flex-end;
  }
  .bppte-event-card{
    grid-template-columns:56px minmax(0,1fr);
    gap:18px;
    padding:26px 24px;
  }
  .bppte-event-actions{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .bppte-sidebar{
    grid-template-columns:1fr;
  }
  .bppte-footer-strip{
    flex-direction:column;
    align-items:stretch;
    padding:26px 20px;
  }
  .bppte-footer-action{
    min-width:0;
  }
}

@media(max-width:520px){
  .bppte-hero h1{
    font-size:38px;
  }
  .bppte-section-heading{
    align-items:stretch;
    flex-direction:column;
  }
  .bppte-filter-label{
    width:100%;
  }
  .bppte-event-card{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    padding:24px 20px;
  }
  .bppte-event-icon{
    width:56px;
    height:56px;
  }
  .bppte-event-actions{
    display:flex;
    flex-direction:column;
  }
  .bppte-title-row{
    align-items:flex-start;
  }
  .bppte-title-row h3{
    font-size:18px;
  }
  .bppte-footer-left{
    align-items:flex-start;
  }
}

/* ===== Dashboard-matched controls and front-end event form ===== */
.bppte-heading-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.bppte-add-event-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:44px;
  padding:0 17px;
  color:#fff;
  background:linear-gradient(135deg,var(--bppte-eggplant),var(--bppte-eggplant-3));
  border:1px solid rgba(201,168,76,.55);
  border-radius:9px;
  box-shadow:0 5px 14px rgba(30,10,46,.18);
  font-weight:800;
  cursor:pointer;
}

.bppte-add-event-btn span{
  color:var(--bppte-gold-light);
  font-size:18px;
  line-height:1;
}

.bppte-add-event-btn:hover{
  background:linear-gradient(135deg,var(--bppte-eggplant-2),var(--bppte-purple));
  box-shadow:0 8px 18px rgba(30,10,46,.24);
  transform:translateY(-1px);
}

.bppte-page-notice{
  width:min(1400px,calc(100% - 64px));
  margin:18px auto 0;
  padding:12px 16px;
  border-radius:10px;
  font-size:13px;
  box-shadow:0 4px 14px rgba(30,10,46,.06);
}

.bppte-page-notice.is-success{
  color:#145f3c;
  background:#edf8f2;
  border:1px solid #abd7bd;
  border-left:4px solid var(--bppte-green);
}

.bppte-page-notice.is-error{
  color:#842626;
  background:#fff1f1;
  border:1px solid #efbcbc;
  border-left:4px solid var(--bppte-red);
}

.bppte-event-modal[hidden]{display:none!important;}
.bppte-event-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
}

.bppte-modal-backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:0;
  background:rgba(22,8,32,.72);
  border:0;
  cursor:pointer;
  backdrop-filter:blur(3px);
}

.bppte-modal-panel{
  position:relative;
  z-index:2;
  width:min(780px,100%);
  max-height:calc(100vh - 56px);
  overflow:auto;
  background:#fff;
  border:1px solid var(--bppte-border-mid);
  border-radius:16px;
  box-shadow:0 24px 70px rgba(22,8,32,.40);
}

.bppte-modal-header{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:22px 26px 19px;
  color:#fff;
  background:linear-gradient(135deg,var(--bppte-eggplant),var(--bppte-eggplant-3));
  border-bottom:2px solid var(--bppte-gold);
}

.bppte-modal-kicker{
  display:block;
  margin-bottom:4px;
  color:var(--bppte-gold-light);
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.bppte-modal-header h2{
  margin:0;
  color:#fff;
  font-family:Montserrat,Inter,ui-sans-serif,sans-serif;
  font-size:24px;
  font-weight:800;
}

.bppte-modal-close{
  flex:0 0 38px;
  width:38px;
  height:38px;
  padding:0;
  color:#fff;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  border-radius:50%;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}

.bppte-modal-close:hover{background:rgba(255,255,255,.18);}

.bppte-event-form{padding:24px 26px 26px;}
.bppte-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:17px 18px;
}

.bppte-form-field{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}

.bppte-form-wide{grid-column:1/-1;}
.bppte-form-field>span{
  color:var(--bppte-eggplant);
  font-size:12px;
  font-weight:800;
}
.bppte-form-field em{color:var(--bppte-red);font-style:normal;}

.bppte-form-field input,
.bppte-form-field select,
.bppte-form-field textarea{
  width:100%;
  min-height:44px;
  padding:10px 12px;
  color:var(--bppte-eggplant);
  background:#fff;
  border:1px solid var(--bppte-border-mid);
  border-radius:9px;
  outline:none;
  font:inherit;
  font-size:13px;
}

.bppte-form-field textarea{min-height:82px;resize:vertical;}
.bppte-form-field input:focus,
.bppte-form-field select:focus,
.bppte-form-field textarea:focus{
  border-color:var(--bppte-purple);
  box-shadow:0 0 0 3px rgba(90,32,128,.12);
}

.bppte-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:24px;
  padding-top:20px;
  border-top:1px solid var(--bppte-border);
}

.bppte-form-actions button{
  min-height:44px;
  padding:10px 20px;
  border-radius:9px;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.bppte-form-cancel{
  color:var(--bppte-eggplant);
  background:#fff;
  border:1px solid var(--bppte-border-mid);
}

.bppte-form-submit{
  color:#fff;
  background:linear-gradient(135deg,var(--bppte-eggplant),var(--bppte-eggplant-3));
  border:1px solid rgba(201,168,76,.55);
  box-shadow:0 5px 14px rgba(30,10,46,.18);
}


.bppte-form-status{
  margin-top:20px;
  padding:12px 14px;
  border-radius:9px;
  font-size:12px;
  font-weight:750;
  line-height:1.45;
}
.bppte-form-status[hidden]{display:none!important;}
.bppte-form-status.is-saving{
  color:var(--bppte-eggplant-3);
  background:#f3f0fa;
  border:1px solid var(--bppte-border-mid);
}
.bppte-form-status.is-success{
  color:#145f3c;
  background:#edf8f2;
  border:1px solid #abd7bd;
}
.bppte-form-status.is-error{
  color:#842626;
  background:#fff1f1;
  border:1px solid #efbcbc;
}
.bppte-form-submit:disabled{
  opacity:.68;
  cursor:wait;
  transform:none!important;
}

body.bppte-modal-open{overflow:hidden!important;}

@media(max-width:760px){
  .bppte-heading-actions{width:100%;justify-content:stretch;}
  .bppte-add-event-btn,.bppte-filter-label{flex:1 1 180px;}
  .bppte-page-notice{width:min(100% - 30px,1400px);}
  .bppte-event-modal{padding:14px;}
  .bppte-modal-panel{max-height:calc(100vh - 28px);}
  .bppte-form-grid{grid-template-columns:1fr;}
  .bppte-form-wide{grid-column:auto;}
}

@media(max-width:520px){
  .bppte-heading-actions{flex-direction:column;align-items:stretch;}
  .bppte-add-event-btn,.bppte-filter-label{width:100%;flex:auto;}
  .bppte-modal-header{padding:18px 18px 15px;}
  .bppte-event-form{padding:18px;}
  .bppte-form-actions{flex-direction:column-reverse;}
  .bppte-form-actions button{width:100%;}
}


/* ===== Event flyers and front-end edit controls ===== */
.bppte-event-card.has-flyer{
  grid-template-columns:150px minmax(0,1fr) minmax(280px,320px);
  min-height:242px;
}

.bppte-event-flyer{
  display:block;
  width:150px;
  aspect-ratio:4/5;
  overflow:hidden;
  background:#f8f6fc;
  border:1px solid var(--bppte-border-mid);
  border-radius:12px;
  box-shadow:0 10px 24px rgba(30,10,46,.14);
}

.bppte-event-flyer img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.bppte-event-flyer:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(30,10,46,.18);
}

.bppte-mobile-edit-pill{
  display:none;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:36px;
  padding:7px 12px;
  color:var(--bppte-eggplant)!important;
  background:#fff;
  border:1px solid var(--bppte-border-mid);
  border-radius:999px;
  box-shadow:0 5px 14px rgba(30,10,46,.12);
  font-size:12px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  z-index:4;
}

.bppte-mobile-edit-pill:hover,
.bppte-mobile-edit-pill:focus{
  color:#fff!important;
  background:var(--bppte-eggplant-3);
  border-color:var(--bppte-eggplant-3);
  outline:none;
}

.bppte-btn-edit{
  color:var(--bppte-eggplant)!important;
  background:#fff;
  border:1px dashed var(--bppte-border-mid);
  cursor:pointer;
}

.bppte-btn-edit:hover{
  color:var(--bppte-eggplant)!important;
  background:#f8f6fc;
  border-style:solid;
}

.bppte-btn-edit .bppte-btn-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
}

.bppte-flyer-field small{
  color:var(--bppte-muted);
  font-size:11px;
  line-height:1.45;
}

.bppte-flyer-preview{
  width:150px;
  aspect-ratio:4/5;
  overflow:hidden;
  margin-top:3px;
  background:#f8f6fc;
  border:1px solid var(--bppte-border-mid);
  border-radius:10px;
}

.bppte-flyer-preview[hidden]{display:none!important;}
.bppte-flyer-preview img{display:block;width:100%;height:100%;object-fit:contain;}

.bppte-remove-flyer{
  display:inline-flex;
  align-items:center;
  gap:7px;
  width:max-content;
  color:#842626;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}

.bppte-remove-flyer[hidden]{display:none!important;}
.bppte-remove-flyer input{width:auto;min-height:auto;margin:0;}

.bppte-form-section{
  padding:18px;
  background:#f8f6fc;
  border:1px solid var(--bppte-border);
  border-radius:12px;
}

.bppte-form-section-heading{
  display:flex;
  flex-direction:column;
  gap:3px;
  margin-bottom:16px;
}

.bppte-form-section-heading strong{
  color:var(--bppte-eggplant);
  font-size:13px;
}

.bppte-form-section-heading small{
  color:var(--bppte-muted);
  font-size:11px;
  line-height:1.45;
}

.bppte-form-subgrid{margin:0;}

@media(max-width:1180px){
  .bppte-event-card.has-flyer{
    grid-template-columns:118px minmax(0,1fr) 250px;
  }
  .bppte-event-flyer{width:118px;}
}

@media(max-width:760px){
  .bppte-event-card.has-flyer{
    grid-template-columns:105px minmax(0,1fr);
  }
  .bppte-event-flyer{width:105px;}
  .bppte-mobile-edit-pill{
    position:absolute;
    top:16px;
    right:16px;
    display:inline-flex;
  }
  .bppte-event-card .bppte-title-row{
    padding-right:72px;
  }
  .bppte-event-actions .bppte-btn-edit{
    grid-column:1/-1;
    min-height:48px;
  }
}

@media(max-width:520px){
  .bppte-event-card.has-flyer{display:flex;}
  .bppte-event-flyer{width:min(190px,100%);align-self:center;}
  .bppte-form-section{padding:14px;}
  .bppte-mobile-edit-pill{
    top:12px;
    right:12px;
  }
  .bppte-event-card .bppte-title-row{
    padding-right:66px;
  }
  .bppte-event-actions .bppte-btn-edit{
    display:flex;
    width:100%;
  }
}


/* ===== v1.2.2 mobile breathing room ===== */
@media(max-width:760px){
  .bppte-root .bppte-event-card,
  .bppte-root .bppte-event-card.has-flyer{
    padding:30px 28px!important;
  }
  .bppte-root .bppte-event-info{
    width:100%;
    padding:0 4px;
  }
  .bppte-root .bppte-event-icon{
    margin-left:4px;
  }
  .bppte-root .bppte-event-actions{
    width:100%;
    margin-top:4px;
    padding-left:0;
    padding-right:0;
  }
  .bppte-root .bppte-meta-line{
    line-height:1.55;
  }
  .bppte-root .bppte-modal-panel{
    width:100%;
  }
  .bppte-root .bppte-event-form{
    padding:24px 22px 28px!important;
  }
}

@media(max-width:520px){
  .bppte-root .bppte-event-card,
  .bppte-root .bppte-event-card.has-flyer{
    padding:32px 26px 28px!important;
  }
  .bppte-root .bppte-event-info{
    padding:0 2px;
  }
  .bppte-root .bppte-event-icon,
  .bppte-root .bppte-event-flyer{
    margin-left:2px;
  }
  .bppte-root .bppte-event-card .bppte-title-row{
    padding-right:76px;
  }
  .bppte-root .bppte-modal-header{
    padding:20px 22px 17px!important;
  }
  .bppte-root .bppte-event-form{
    padding:24px 22px 30px!important;
  }
  .bppte-root .bppte-form-section{
    padding:17px!important;
  }
  .bppte-root .bppte-form-field input,
  .bppte-root .bppte-form-field select,
  .bppte-root .bppte-form-field textarea{
    padding-left:14px;
    padding-right:14px;
  }
  .bppte-root .bppte-form-actions{
    padding-bottom:max(4px,env(safe-area-inset-bottom));
  }
}


/* ===== v1.2.3 desktop flyer-card layout correction ===== */
/* Keep editing visible without allowing the edit control to consume an entire
   desktop action column. The small pill is the single edit control everywhere. */
.bppte-root .bppte-mobile-edit-pill{
  position:absolute;
  top:20px;
  right:20px;
  display:inline-flex;
}

.bppte-root .bppte-event-actions .bppte-btn-edit{
  display:none!important;
}

/* Cards with no attendee-facing links do not reserve a blank action column. */
.bppte-root .bppte-event-card.edit-only{
  grid-template-columns:78px minmax(0,1fr);
}

.bppte-root .bppte-event-card.edit-only .bppte-event-actions{
  display:none;
}

/* Flyer cards use the flyer as a visual column, not as a reason to squeeze the
   event title into a narrow stack of one-word lines. */
.bppte-root .bppte-event-card.has-flyer{
  grid-template-columns:180px minmax(300px,1fr) minmax(230px,280px);
  gap:28px;
  min-height:270px;
  padding:34px 38px;
}

.bppte-root .bppte-event-card.has-flyer.edit-only{
  grid-template-columns:180px minmax(0,1fr);
}

.bppte-root .bppte-event-flyer{
  width:180px;
  align-self:center;
}

.bppte-root .bppte-event-info{
  min-width:0;
  padding-right:18px;
}

.bppte-root .bppte-title-row{
  padding-right:82px;
}

.bppte-root .bppte-title-row h3{
  max-width:100%;
  word-break:normal;
  overflow-wrap:break-word;
  hyphens:none;
}

.bppte-root .bppte-event-card.has-flyer .bppte-title-row h3{
  font-size:22px;
  line-height:1.22;
}

.bppte-root .bppte-event-card.has-flyer .bppte-meta-line{
  font-size:15px;
  line-height:1.48;
}

.bppte-root .bppte-event-card.has-flyer .bppte-event-actions{
  padding-left:0;
}

@media(max-width:1180px) and (min-width:761px){
  .bppte-root .bppte-event-card.has-flyer{
    grid-template-columns:140px minmax(250px,1fr) minmax(205px,235px);
    gap:22px;
    padding:30px 30px;
  }
  .bppte-root .bppte-event-card.has-flyer.edit-only{
    grid-template-columns:140px minmax(0,1fr);
  }
  .bppte-root .bppte-event-flyer{
    width:140px;
  }
  .bppte-root .bppte-event-card.has-flyer .bppte-title-row h3{
    font-size:20px;
  }
}

@media(max-width:760px){
  .bppte-root .bppte-event-card.edit-only,
  .bppte-root .bppte-event-card.has-flyer,
  .bppte-root .bppte-event-card.has-flyer.edit-only{
    grid-template-columns:105px minmax(0,1fr);
  }
  .bppte-root .bppte-event-info{
    padding-right:0;
  }
  .bppte-root .bppte-event-card.has-event-actions .bppte-event-actions{
    grid-column:1/-1;
  }
}

@media(max-width:520px){
  .bppte-root .bppte-event-card.edit-only,
  .bppte-root .bppte-event-card.has-flyer,
  .bppte-root .bppte-event-card.has-flyer.edit-only{
    display:flex;
  }
  .bppte-root .bppte-event-flyer{
    width:min(210px,100%);
  }
  .bppte-root .bppte-title-row{
    padding-right:76px;
  }
}


/* ===== v1.2.4 no-flyer desktop card correction ===== */
/* The icon card uses a different structure from flyer cards. Keeping the title
   and badge in a single flex row allowed the badge to squeeze long titles into
   a narrow word stack. No-flyer cards now reserve a healthy details column and
   place the recurrence badge beneath the title. */
@media(min-width:981px){
  .bppte-root .bppte-event-card.no-flyer.has-event-actions{
    grid-template-columns:92px minmax(390px,1fr) minmax(300px,380px)!important;
    gap:36px;
    min-height:220px;
    padding:38px 44px;
  }

  .bppte-root .bppte-event-card.no-flyer.edit-only{
    grid-template-columns:92px minmax(0,1fr)!important;
    gap:36px;
    min-height:200px;
    padding:38px 44px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-event-icon{
    width:82px;
    height:82px;
    margin:0;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-title-row{
    display:block;
    width:100%;
    padding-right:0;
    margin-bottom:18px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-title-row h3{
    display:block;
    width:100%;
    max-width:none;
    font-size:24px;
    line-height:1.2;
    overflow-wrap:normal;
    word-break:normal;
    hyphens:none;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-title-row .bppte-badge{
    margin-top:16px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-event-info{
    width:100%;
    min-width:0;
    padding-right:12px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-event-actions{
    width:100%;
    min-width:0;
    padding:16px 0 8px;
  }
}

/* At narrower desktop/tablet widths, use a two-column information row and
   place attendee buttons beneath it. This prevents either side from collapsing. */
@media(max-width:980px) and (min-width:761px){
  .bppte-root .bppte-event-card.no-flyer,
  .bppte-root .bppte-event-card.no-flyer.has-event-actions,
  .bppte-root .bppte-event-card.no-flyer.edit-only{
    grid-template-columns:72px minmax(0,1fr)!important;
    gap:22px;
    padding:30px 30px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-title-row{
    display:block;
    width:100%;
    padding-right:84px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-title-row .bppte-badge{
    margin-top:12px;
  }

  .bppte-root .bppte-event-card.no-flyer.has-event-actions .bppte-event-actions{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    padding:8px 0 0;
  }
}

@media(max-width:760px){
  .bppte-root .bppte-event-card.no-flyer .bppte-title-row{
    display:block;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-title-row .bppte-badge{
    margin-top:12px;
  }
}


/* ===== v1.2.5 keep desktop action buttons inside event cards ===== */
/* Fluent Community can resolve width:100% on a grid child against a wider
   containing block. Let the grid size the action area and cap every child to it. */
.bppte-root .bppte-event-card{
  max-width:100%;
}

.bppte-root .bppte-event-actions{
  min-width:0;
  width:auto!important;
  max-width:100%;
  justify-self:stretch;
}

.bppte-root .bppte-event-actions .bppte-btn{
  min-width:0;
  width:auto!important;
  max-width:100%;
}

@media(min-width:981px){
  .bppte-root .bppte-event-card.no-flyer.has-event-actions{
    grid-template-columns:92px minmax(0,1fr) minmax(250px,320px)!important;
    column-gap:30px;
    overflow:hidden;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-event-info{
    width:auto;
    min-width:0;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-event-actions{
    width:auto!important;
    min-width:0;
    max-width:100%;
    padding:12px 0 8px!important;
  }
}

/* When the content column is narrower because the Fluent Community sidebar is
   wide, stack the attendee buttons below instead of allowing any overflow. */
@media(max-width:1280px) and (min-width:761px){
  .bppte-root .bppte-event-card.no-flyer.has-event-actions{
    grid-template-columns:76px minmax(0,1fr)!important;
    gap:24px;
  }

  .bppte-root .bppte-event-card.no-flyer.has-event-actions .bppte-event-actions{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    width:auto!important;
    padding:10px 0 0!important;
  }
}

/* ===== v1.2.6 restore compact no-flyer information layout ===== */
/* The previous containment fix kept buttons inside the card, but the no-flyer
   information column became too narrow. Restore the compact dashboard-style
   proportions: small icon, generous information column, controlled actions. */
.bppte-root .bppte-main{
  container-type:inline-size;
  container-name:bppte-main;
}

@media(min-width:981px){
  .bppte-root .bppte-event-card.no-flyer.has-event-actions{
    grid-template-columns:78px minmax(0,1fr) minmax(245px,285px)!important;
    column-gap:24px;
    min-height:188px;
    padding:28px 30px;
    align-items:center;
    overflow:hidden;
  }

  .bppte-root .bppte-event-card.no-flyer.edit-only{
    grid-template-columns:78px minmax(0,1fr)!important;
    column-gap:24px;
    min-height:180px;
    padding:28px 30px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-event-icon{
    width:72px;
    height:72px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-event-info{
    width:auto;
    min-width:0;
    padding:0!important;
  }

  .bppte-root .bppte-event-card.no-flyer.has-event-actions .bppte-title-row{
    display:block;
    width:100%;
    padding-right:0!important;
    margin-bottom:14px;
  }

  .bppte-root .bppte-event-card.no-flyer.edit-only .bppte-title-row{
    display:block;
    width:100%;
    padding-right:92px!important;
    margin-bottom:14px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-title-row h3{
    width:100%;
    max-width:none;
    margin:0;
    font-size:21px;
    line-height:1.2;
    overflow-wrap:normal;
    word-break:normal;
    hyphens:none;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-title-row .bppte-badge{
    margin-top:12px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-meta-line{
    gap:9px;
    margin:7px 0;
    font-size:14px;
    line-height:1.42;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-meta-line > span:last-child{
    min-width:0;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-recurrence-pill{
    margin-top:12px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-event-actions{
    align-self:center;
    justify-self:stretch;
    width:auto!important;
    min-width:0;
    max-width:285px;
    padding:0!important;
    gap:10px;
  }

  .bppte-root .bppte-event-card.no-flyer .bppte-event-actions .bppte-btn{
    min-height:48px;
    width:auto!important;
    max-width:100%;
    padding:12px 16px;
    font-size:13px;
  }
}

/* Use the actual event-column width rather than the full browser width. This
   keeps the three-column desktop layout when there is room and stacks the
   buttons only when the TeamBPP content column is genuinely narrow. */
@container bppte-main (min-width:821px){
  .bppte-root .bppte-event-card.no-flyer.has-event-actions{
    grid-template-columns:78px minmax(0,1fr) minmax(245px,285px)!important;
    column-gap:24px;
  }

  .bppte-root .bppte-event-card.no-flyer.has-event-actions .bppte-event-actions{
    grid-column:auto!important;
    display:flex!important;
    grid-template-columns:none!important;
    width:auto!important;
    max-width:285px;
    padding:0!important;
  }
}

@container bppte-main (max-width:820px){
  .bppte-root .bppte-event-card.no-flyer.has-event-actions{
    grid-template-columns:72px minmax(0,1fr)!important;
    column-gap:20px;
  }

  .bppte-root .bppte-event-card.no-flyer.has-event-actions .bppte-event-actions{
    grid-column:1/-1!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:auto!important;
    max-width:none;
    padding-top:8px!important;
  }
}

/* ===== v1.2.7 keep no-flyer icon fully inside the card ===== */
/* The compact desktop grid left the circular icon and its shadow too close to
   the clipped card edge. Offset only the visual icon so the information and
   action column widths stay exactly as approved in v1.2.6. */
@media(min-width:761px){
  .bppte-root .bppte-event-card.no-flyer .bppte-event-icon{
    position:relative;
    left:14px;
    margin-left:0!important;
    justify-self:start;
  }
}
