/* ===================== [START] - Attendee Portal ===================== */
/* (Keep the hero rules above this block: .googlecloud-next27-selfreg-order ... and .attendee-hero-section.)
   Replace everything from the "===== Component =====" comment down to "[END] - Attendee Portal" with this.

   Each card is built from separate RainFocus sections, so visibility criteria can be set on every
   link (RainFocus only allows visibility criteria on a whole section). Section custom classes:
     ap-piece ap-card-N ap-head   icon + title           always visible
     ap-piece ap-card-N ap-link   one link               visibility criteria per section
     ap-piece ap-card-N ap-foot   empty bottom cap       always visible
   N: 1 Registration & Billing, 2 Travel & Hotels, 3 Account & Privacy, 4 Post-Event Resources.
   Build the sections card by card (all of card 1, then card 2, ...).

   Below 992px the pieces stack in builder order. From 992px, attendeeportal.js puts the page
   wrapper on a grid (.ap-grid) and gives every section an explicit row and column, so each card
   stacks in its own column, two cards per row, and both cards in a row end level. Without the
   script the cards still stack correctly, just one per row. */

.ap-piece {
  --ap-card-bg: var(--Grey-1100, #18191D);
  --ap-radius: 16px;
}

/* ---------- Collapse the RainFocus wrappers around each piece ---------- */
.flex-box-section-full.ap-piece {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.ap-piece .flex-box-section-full-interior,
.ap-piece .flex-box-section,
.ap-piece .flex-box-child,
.ap-piece .element-container-wrapper,
.ap-piece .element-container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 0 !important;
}

/* ---------- Card surface (on the section's first inner box, so it stays inside the page gutters) ----------
   Spacing is padding, never margin: a margin could collapse out of the surface and leave a gap
   between two pieces of the same card. */
.ap-piece > .flex-box-section-full-interior > .flex-box-section {
  background: var(--ap-card-bg);
  padding-left: 24px !important;
  padding-right: 24px !important;
}
.ap-head > .flex-box-section-full-interior > .flex-box-section {
  padding-top: 32px !important;
  padding-bottom: 8px !important; /* + the link's 16px top padding + 8px inside the link = 32px to the first link's text, as in the Figma */
  border-radius: var(--ap-radius) var(--ap-radius) 0 0;
}
.ap-link > .flex-box-section-full-interior > .flex-box-section {
  padding-top: 16px !important;
}
.ap-foot > .flex-box-section-full-interior > .flex-box-section {
  min-height: 32px !important;
  border-radius: 0 0 var(--ap-radius) var(--ap-radius);
}

/* ---------- Space around and between cards ---------- */
/* By position, not card number (classes set by attendeeportal.js), so the spacing stays right
   whichever cards are hidden. Phones/tablets: one card per row. */
.flex-box-section-full.ap-head { padding-top: 24px !important; }
.flex-box-section-full.ap-head.ap-first { padding-top: 64px !important; }
.flex-box-section-full.ap-foot.ap-last { padding-bottom: 64px !important; }

/* A card with no visible links is hidden whole by attendeeportal.js */
.flex-box-section-full.ap-piece.ap-hidden { display: none !important; }

/* ---------- Title ---------- */
.ap-piece .attendee-menu-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-weight: 400 !important;
}
.ap-piece .attendee-menu-title svg { flex: none; }

/* ---------- Links ---------- */
.reg-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: inherit;
  text-decoration: none !important;
  font-family: "Google Sans Display";
  font-size: 24px;
  font-weight: 400;
  line-height: 100%;
  letter-spacing: -0.24px;
  transition: opacity 0.15s ease;
  padding: 8px 0;
  margin-top: 16px;
}
/* White in every state. "inherit" picked up the grey body text color once a link was visited, because
   only the site's a:link rule was making unvisited links white. */
.reg-menu__link,
.reg-menu__link:link,
.reg-menu__link:visited,
.reg-menu__link:hover { color: #fff; }
.ap-piece .reg-menu__link { margin-top: 0; } /* the section's padding does this job */
.reg-menu__link .reg-menu_link-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #9AA0A6;
}
.reg-menu__link:hover { opacity: 0.75; }
.reg-menu__link:focus-visible {
  outline: 2px solid #8ab4f8;
  outline-offset: 4px;
}
.reg-menu__chevron {
  flex-shrink: 0;
  width: 0.8em;
  height: 0.8em;
  transition: transform 0.15s ease;
}
.reg-menu__link:hover .reg-menu__chevron { transform: translateX(4px); }

/* Coming soon: grey text and chevron, not clickable */
.reg-menu__link.coming-soon-link,
.reg-menu__link.coming-soon-link:link,
.reg-menu__link.coming-soon-link:visited {
  color: #9AA0A6;
  pointer-events: none;
  cursor: default;
}
.coming-soon-label {
  color: var(--Blue-1000, #192967);
  font-family: "Google Sans Flex";
  font-size: 12px;
  font-weight: 500;
  line-height: 100%;
  border-radius: 999px;
  background: var(--Blue-50, #BBE2FF);
  display: inline-flex;
  padding: 4px 6px 4px 4px;
  align-items: center;
  gap: 2px;
}
.coming-soon-label svg { flex: none; }

/* ---------- "Manage Order(s)" (native Order Summary Card, styled as a link row) ----------
   Section: ap-piece ap-card-1 ap-link, holding only the Order Summary Card element. Everything but the
   card's footer button is hidden, and the button is restyled to match the other link rows: same font,
   size and height, label on the left, dropdown arrow on the right. The dropdown it opens (Change /
   Transfer / Cancel) is RainFocus's own menu and keeps its current look. */
.reg-menu-section .order-summary-card .card-body,
.ap-piece .order-summary-card .card-header,
.ap-piece .order-summary-card .card-body {
  display: none;
}
.ap-piece .order-summary-card {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.reg-menu-section .card-footer,
.ap-piece .card-footer {
  display: block;
  border: none;
  background: transparent;
  padding: 0;
}
.ap-piece .card-footer .rf-trigger-menu {
  display: block;
  width: 100%;
}
.reg-menu-section .card-footer .mdBtnR.mdBtnR-primary,
.ap-piece .card-footer .mdBtnR.mdBtnR-primary {
  --rf-comp-button-font-size: 24px;
  --rf-comp-button-font-weight: 400;
  width: 100%;
  background: transparent !important;
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}
.ap-piece .card-footer .mdBtnR.mdBtnR-primary {
  align-items: center;
  gap: 24px;
  min-height: 0;          /* the site's buttons are 56px tall; link rows are 40px */
  height: auto;
  border: 0;
  border-radius: 0;
  color: #fff;
  font-family: "Google Sans Display";
  line-height: 100%;
  letter-spacing: -0.24px;
  text-align: left;
  transition: opacity 0.15s ease;
}
.ap-piece .card-footer .mdBtnR.mdBtnR-primary:hover {
  filter: none;
  opacity: 0.75;          /* same hover as the links */
}
.ap-piece .card-footer .mdBtnR.mdBtnR-primary:focus-visible {
  outline: 2px solid #8ab4f8;
  outline-offset: 4px;
}
.ap-piece .card-footer .mdBtnR-text {
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}
/* The card's dropdown triangle is swapped for the same chevron as the other rows */
.ap-piece .card-footer .mdBtnR .rfSI { display: none !important; }
.ap-piece .card-footer .mdBtnR.mdBtnR-primary::after {
  content: "";
  flex: none;
  width: 0.8em;
  height: 0.8em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 3l9 9-9 9' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 3l9 9-9 9' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.15s ease;
}
.ap-piece .card-footer .mdBtnR.mdBtnR-primary:hover::after { transform: translateX(4px); }

/* ---------- Download Invoice + Manage Order, both from ONE Order Summary Card ----------
   Section: ap-piece ap-card-N ap-link ap-order, holding the Order Summary Card element. The card shows
   as two link rows: its header download button becomes "Download Invoice" (label from the button's own
   aria-label, so it follows RainFocus's translation), and its footer button stays "Manage Order" with
   the dropdown (styled in the Manage Order block above). The title and order details are hidden. */
.ap-piece.ap-order .order-summary-card .card-header {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.ap-piece.ap-order .order-summary-card .card-header-title,
.ap-piece.ap-order .order-summary-card .card-body {
  display: none !important;
}
/* Same 16px gap between the two rows as between any two link rows */
.ap-piece.ap-order .order-summary-card .card-footer {
  padding-top: 16px !important;
}
.ap-piece.ap-order .order-summary-card .card-controls {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}
.ap-piece.ap-order .order-summary-card .card-controls button.rfSI {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 8px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  font-family: "Google Sans Display";
  font-size: 24px;
  font-weight: 400;
  line-height: 100%;
  letter-spacing: -0.24px;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.15s ease;
}
.ap-piece.ap-order .order-summary-card .card-controls button.rfSI svg { display: none !important; }
.ap-piece.ap-order .order-summary-card .card-controls button.rfSI::before { content: attr(aria-label); }
.ap-piece.ap-order .order-summary-card .card-controls button.rfSI::after {
  content: "";
  flex: none;
  width: 0.8em;
  height: 0.8em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 3l9 9-9 9' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 3l9 9-9 9' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.15s ease;
}
.ap-piece.ap-order .order-summary-card .card-controls button.rfSI:hover { opacity: 0.75; }
.ap-piece.ap-order .order-summary-card .card-controls button.rfSI:hover::after { transform: translateX(4px); }
.ap-piece.ap-order .order-summary-card .card-controls button.rfSI:focus-visible {
  outline: 2px solid #8ab4f8 !important;
  outline-offset: 4px;
}

/* ---------- Native RainFocus Button as a link row ----------
   Any RainFocus Button element inside a card section (data-type="button", set by RainFocus) is
   restyled to look exactly like the HTML link rows: no pill, no gradient, same font and size, and
   the same chevron. No extra class needed: put a Button element in an ap-link section and it's done.
   The destination is still set in the workflow settings.
   The Add to Calendar dropdown (an HTML Code Block, so no data-type="button") gets the same look
   through its .bw-rf-add-to-calendar wrapper, listed alongside each rule below. */
.ap-piece [data-type="button"] .rf-flex-frame,
.ap-piece [data-type="button"] .rainfocus-btn-group,
.ap-piece [data-type="button"] .rainfocus-button,
.ap-piece [data-type="button"] .mdBtnR-container,
.ap-piece .bw-rf-add-to-calendar {
  display: block !important;
  width: 100%;
  margin: 0 !important;   /* RainFocus's flex frame has its own margins, which pulled the row up */
  padding: 0 !important;
  gap: 0;
  text-align: left;
}
.ap-piece [data-type="button"] .mdBtnR,
.ap-piece .bw-rf-add-to-calendar .mdBtnR {
  --rf-comp-button-font-size: 24px;
  --rf-comp-button-font-weight: 400;
  --rf-comp-button-space-padding: 8px 0;
  --rf-comp-button-shape-radius: 0;
  --rf-comp-button-shape-border-width: 0;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 8px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  color: #fff !important;
  font-family: "Google Sans Display";
  font-size: 24px;
  font-weight: 400;
  line-height: 100%;
  letter-spacing: -0.24px;
  text-align: left;
  text-transform: none;
  text-decoration: none !important;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.ap-piece [data-type="button"] .mdBtnR:hover,
.ap-piece .bw-rf-add-to-calendar .mdBtnR:hover { opacity: 0.75; }
.ap-piece [data-type="button"] .mdBtnR:focus-visible,
.ap-piece .bw-rf-add-to-calendar .mdBtnR:focus-visible {
  outline: 2px solid #8ab4f8;
  outline-offset: 4px;
}
.ap-piece [data-type="button"] .mdBtnR-text,
.ap-piece .bw-rf-add-to-calendar .mdBtnR-text {
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-decoration: none;
}
.ap-piece [data-type="button"] .mdBtnR .rfSI { display: none; } /* any icon set on the button; the chevron replaces it */
/* Chevron, same shape and size as the link rows' */
.ap-piece [data-type="button"] .mdBtnR::after,
.ap-piece .bw-rf-add-to-calendar .mdBtnR::after {
  content: "";
  flex: none;
  width: 0.8em;
  height: 0.8em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 3l9 9-9 9' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 3l9 9-9 9' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.15s ease;
}
.ap-piece [data-type="button"] .mdBtnR:hover::after,
.ap-piece .bw-rf-add-to-calendar .mdBtnR:hover::after { transform: translateX(4px); }

/* ---------- Tablet and below ---------- */
@media (max-width: 991px) {
  .reg-menu__link {
    font-size: 18px;
    margin-top: 12px;
  }
  .ap-link > .flex-box-section-full-interior > .flex-box-section {
    padding-top: 12px !important;
  }
  .ap-head > .flex-box-section-full-interior > .flex-box-section {
    padding-bottom: 12px !important;
  }
  .reg-menu-section .card-footer .mdBtnR.mdBtnR-primary,
  .ap-piece .card-footer .mdBtnR.mdBtnR-primary {
    --rf-comp-button-font-size: 18px;
  }
  .ap-piece [data-type="button"] .mdBtnR,
  .ap-piece .bw-rf-add-to-calendar .mdBtnR,
  .ap-piece.ap-order .order-summary-card .card-controls button.rfSI {
    --rf-comp-button-font-size: 18px;
    font-size: 18px;
  }
  .ap-piece.ap-order .order-summary-card .card-footer {
    padding-top: 12px !important;
  }
}

/* ---------- Desktop: two cards per row (grid set up by attendeeportal.js) ---------- */
@media (min-width: 992px) {
  .ap-grid {
    --ap-gutter: 32px;
    display: grid !important;
    /* page gutter | card | 24px gap | card | page gutter  (664 + 24 + 664 = 1352, the site width) */
    grid-template-columns:
      minmax(var(--ap-gutter), 1fr)
      minmax(0, 664px)
      24px
      minmax(0, 664px)
      minmax(var(--ap-gutter), 1fr);
  }
  .ap-grid > * { min-width: 0; }

  /* Other sections (the hero, etc.) span the full row. In a grid, auto side margins shrink a section
     to the width of its content, so they're cleared here. */
  .ap-grid > :not(.ap-piece) {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* The grid column already sets the width: drop the section's own gutters and max-width */
  .ap-grid > .flex-box-section-full.ap-piece > .flex-box-section-full-interior {
    --ar-gutter-x: 0px !important;
    max-width: none !important;
    width: 100%;
  }

  /* Every piece fills its whole grid cell, so the card surface never has a gap, and the foot
     stretches down to the bottom of the row so both cards in a row end level */
  .ap-grid > .ap-piece,
  .ap-grid > .ap-piece > .flex-box-section-full-interior {
    display: flex;
    flex-direction: column;
  }
  .ap-grid > .ap-piece > .flex-box-section-full-interior,
  .ap-grid > .ap-piece > .flex-box-section-full-interior > .flex-box-section {
    flex: 1 1 auto;
  }

  .flex-box-section-full.ap-head.ap-top { padding-top: 80px !important; }
  .flex-box-section-full.ap-foot.ap-bottom { padding-bottom: 80px !important; }
}
@media (min-width: 1440px) {
  .ap-grid { --ap-gutter: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .reg-menu__link,
  .reg-menu__chevron,
  .ap-piece .card-footer .mdBtnR.mdBtnR-primary::after,
  .ap-piece [data-type="button"] .mdBtnR,
  .ap-piece [data-type="button"] .mdBtnR::after,
  .ap-piece .bw-rf-add-to-calendar .mdBtnR,
  .ap-piece .bw-rf-add-to-calendar .mdBtnR::after,
  .ap-piece.ap-order .order-summary-card .card-controls button.rfSI,
  .ap-piece.ap-order .order-summary-card .card-controls button.rfSI::after { transition: none; }
}
/* ===================== [END] - Attendee Portal ===================== */