@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

/* Shared action treatment for all Bulawa invitation themes.
 * Apply shape and sizing only; each design retains its own palette.
 * Do not modify native file pickers, gallery/lightbox controls or floating utilities. */
body[data-theme] #invitation :is(
  main .section .button,
  main .section button[type="submit"],
  main .section .form-box > button,
  main .section .message > button,
  main .section .voice-composer .voice-card button,
  main .section .voice-composer .voice-review-actions button,
  main .section .event a[href],
  main .section .rv-event a[href],
  main .section [data-calendar],
  footer > #replay
){
  border-radius:999px!important;
  min-height:44px;
  box-sizing:border-box;
}
body[data-theme] #invitation :is(
  main .section .button,
  main .section button[type="submit"],
  main .section .form-box > button,
  main .section .message > button,
  main .section .voice-composer .voice-card button,
  main .section .event a[href],
  main .section .rv-event a[href],
  footer > #replay
):focus-visible{
  outline:2px solid var(--gold,#c8a25d);
  outline-offset:3px;
}
/* Keepsake is two vertically stacked actions across every template.
   Higher specificity defeats historical mobile and Ruby Velvet flex rules. */
body[data-theme] #invitation main > section#keepsake > .guest-actions{
  display:flex!important;
  flex-direction:column!important;
  flex-wrap:nowrap!important;
  justify-content:center!important;
  align-items:center!important;
  gap:10px!important;
  width:100%;
  max-width:100%;
  margin:14px auto 0!important;
}
body[data-theme] #invitation main > section#keepsake > .guest-actions > .button{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  flex:0 0 auto!important;
  width:min(100%,320px)!important;
  max-width:320px!important;
  min-height:44px;
  margin:0 auto!important;
  text-align:center;
  border-radius:999px!important;
  white-space:normal;
}
body[data-theme] #invitation main > section#keepsake > .guest-actions > .button[hidden]{
  display:none!important;
}
/* Match Ruby Velvet's recently approved compact vertical rhythm in Keepsake.
   Do not override ornamental frames used by the other themes. */
body[data-theme] #invitation main > section#keepsake{
  box-sizing:border-box;
  min-height:0!important;
  margin-block:0!important;
  padding-block:clamp(26px,7cqw,38px)!important;
}
body[data-theme] #invitation main > section#keepsake > .ornament{
  margin-block:10px 14px;
}
body[data-theme] #invitation main > section#keepsake > h2{
  margin-block:6px 15px;
}
@media(prefers-reduced-motion:reduce){
  body[data-theme] #invitation main > section#keepsake > .guest-actions > .button{
    transition:none!important;
  }
}


/* Template-specific event action markup does not use .button.
   Match the actual rendered event controls, and theme-neutral content CTAs,
   without rounding photos, input widgets, and decorative art. */
body[data-theme] #invitation :is(
  .nj-event-actions .nj-event-action,
  .wc-event-actions > a,
  .wc-event-actions > button,
  .ri-event-actions > a,
  .ri-event-actions > button,
  .ev-event-actions > a,
  .ev-event-actions > button,
  .event-actions > a,
  .event-actions > button,
  .events .event a[href],
  .events .event button[data-calendar],
  .section .voice-review-actions > button,
  .section .voice-composer .text-button,
  .section .message button,
  .section .upload-panel button.button,
  .section .form-box button.button,
  .section .form-box button[type="submit"],
  .section button#submitWish,
  .section button#photoSend,
  .section button#sendVoiceFile,
  .section button#sendVoice,
  .section button#record,
  .section button#stop,
  .section .guest-actions > .button,
  .section .button,
  footer #replay
){
  border-radius:999px!important;
  box-sizing:border-box!important;
}
/* Keep two event actions together if both are rendered. */
body[data-theme] #invitation :is(.nj-event-actions,.wc-event-actions,.ri-event-actions){
  display:flex;
  flex-flow:row wrap;
  align-items:center;
  gap:8px;
}
body[data-theme] #invitation :is(.nj-event-actions,.wc-event-actions,.ri-event-actions) > :is(a,button){
  flex:1 1 0;
  min-width:0;
  text-align:center;
}
@media(max-width:350px){
  body[data-theme] #invitation :is(.nj-event-actions,.wc-event-actions,.ri-event-actions) > :is(a,button){
    font-size:10px;
    padding-inline:8px;
  }
}

/*
 * Wedding-specific Events and Venue refinement.
 * The wedding viewer loads this stylesheet; birthday invitations use their own viewer.
 * Never apply the English font to Urdu copy and never recolor other sections.
 */
html[lang="en"] body[data-theme] #invitation main :is(#events,#venue),
html[lang="en"] body[data-theme] #invitation main :is(#events,#venue) :is(h2,h3,h4,p,span,strong,small,dt,dd,a,button,label,summary,time){
  font-family:'Manrope',Arial,sans-serif!important;
}

/* Clearer small metadata in Events and Venue, while preserving theme artwork and headings. */
html[lang="en"] body[data-theme] #invitation main #events :is(
  .event-date,.time,.venue-name,.mh-event-details,.ds-event-details,.pp-event-details,
  .nj-event-date,.nj-event-venue,.nj-event-address,.rp-event-date,.rp-event-time,
  .rp-event-venue,.rp-event-address,.ee-v2-event-date,.ee-v2-event-time,
  .ee-v2-event-venue,.ee-v2-event-address,.mg-address
),
html[lang="en"] body[data-theme] #invitation main #venue :is(
  .mh-venue-address,.ds-venue-address,.pp-venue-address,.venue-entry p,
  .mh-venue-event,.ds-venue-event,.pp-venue-event
){
  font-size:clamp(12px,3.3cqw,14px);
  line-height:1.65;
}

/* One Event action fills the row; two available actions share one row.
   These wrappers cover the built-in wedding renderers and the generic layout. */
body[data-theme] #invitation main #events :is(
  .mh-event-actions,.ds-event-actions,.pp-event-actions,.wc-event-actions,
  .ri-event-actions,.ev-event-actions,.nm-event-actions,.mg-event-actions,
  .nj-event-actions,.rp-event-actions,.ee-v2-event-actions,
  .haveli-event-card > .guest-actions,
  .events > article.event:not([class*="-event"]) > div:last-child
){
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  justify-content:stretch!important;
  gap:8px;
}
body[data-theme] #invitation main #events :is(
  .mh-event-actions,.ds-event-actions,.pp-event-actions,.wc-event-actions,
  .ri-event-actions,.ev-event-actions,.nm-event-actions,.mg-event-actions,
  .nj-event-actions,.rp-event-actions,.ee-v2-event-actions,
  .haveli-event-card > .guest-actions,
  .events > article.event:not([class*="-event"]) > div:last-child
) > :is(a,button){
  flex:1 1 0%!important;
  width:0!important;
  min-width:0!important;
  max-width:none!important;
  min-height:44px;
  margin:0!important;
  padding:8px 6px;
  box-sizing:border-box;
  text-align:center;
  white-space:normal!important;
  overflow-wrap:anywhere;
}
body[data-theme] #invitation main #events :is(a[href],button[data-calendar],button.button),
body[data-theme] #invitation main #venue a[href]{
  background:#173e32!important;
  border:1px solid #ac8545!important;
  color:#fff9ed!important;
  border-radius:999px!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  box-sizing:border-box;
  font-size:clamp(10px,2.8cqw,12px);
  font-weight:600;
  line-height:1.45;
  min-height:44px;
  white-space:normal;
  overflow-wrap:anywhere;
}
body[data-theme] #invitation main :is(#events,#venue) :is(a[href],button[data-calendar],button.button):is(:hover,:focus-visible){
  filter:brightness(1.12);
}
html[lang="ur"] body[data-theme] #invitation main :is(#events,#venue) :is(a[href],button[data-calendar],button.button){
  font-family:'Noto Nastaliq Urdu',serif;
  line-height:1.85;
}
