/* CBA_CONTEXT_BELL_STYLES */

.cba-context-bell-trigger {
  appearance:none;
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  min-width:42px;
  margin-left:8px;
  padding:0;
  border:1px solid #d0d5dd;
  border-radius:999px;
  background:#fff;
  color:#667085;
  cursor:pointer;
  vertical-align:middle;
  box-sizing:border-box;
}

.cba-context-bell-trigger:hover,
.cba-context-bell-trigger:focus-visible {
  border-color:#111;
  color:#111;
  background:#f7f7f7;
  outline:none;
}

.cba-context-bell-trigger.is-following {
  border-color:#111;
  color:#111;
}

.cba-context-bell-trigger.is-notifying {
  border-color:#b8860b;
  background:#fff8dc;
  color:#9a6700;
}

.cba-context-bell-trigger.is-loading {
  opacity:.6;
  pointer-events:none;
}

.cba-context-bell-trigger svg {
  display:block;
  width:20px;
  height:24px;
  fill:currentColor;
}

.cba-context-bell-dot {
  position:absolute;
  top:3px;
  right:3px;
  display:none;
  width:8px;
  height:8px;
  border:2px solid #fff;
  border-radius:999px;
  background:#d11;
}

.cba-context-bell-trigger.is-notifying
.cba-context-bell-dot {
  display:block;
}

.cba-context-bell-popover {
  position:fixed;
  z-index:100000;
  display:none;
  width:min(370px, calc(100vw - 24px));
  max-height:calc(100vh - 24px);
  overflow:auto;
  padding:16px;
  border:1px solid #d9dde5;
  border-radius:16px;
  background:#fff;
  color:#111;
  box-shadow:0 18px 55px rgba(16,24,40,.22);
  box-sizing:border-box;
}

.cba-context-bell-popover.is-open {
  display:block;
}

.cba-context-bell-popover.is-busy button {
  pointer-events:none;
  opacity:.65;
}

.cba-context-bell-heading {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.cba-context-bell-heading strong {
  display:block;
  font-size:17px;
  line-height:1.25;
}

.cba-context-bell-heading span {
  display:block;
  margin-top:3px;
  color:#667085;
  font-size:12px;
}

.cba-context-bell-close {
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  min-width:30px;
  padding:0;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#667085;
  cursor:pointer;
  font-size:23px;
  line-height:1;
}

.cba-context-bell-close:hover,
.cba-context-bell-close:focus-visible {
  background:#f2f4f7;
  color:#111;
  outline:none;
}

.cba-context-bell-section-title {
  margin:15px 0 6px;
  color:#667085;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.cba-context-bell-row {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto auto;
  align-items:center;
  gap:9px;
  padding:10px 0;
  border-top:1px solid #eef0f3;
}

.cba-context-bell-copy {
  min-width:0;
}

.cba-context-bell-copy strong {
  display:block;
  overflow:hidden;
  font-size:14px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.cba-context-bell-copy span {
  display:block;
  margin-top:2px;
  color:#667085;
  font-size:11px;
}

.cba-context-switch {
  appearance:none;
  position:relative;
  width:42px;
  height:24px;
  min-width:42px;
  padding:0;
  border:0;
  border-radius:999px;
  background:#d0d5dd;
  cursor:pointer;
}

.cba-context-switch::after {
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.25);
  transition:transform .16s ease;
}

.cba-context-switch.is-on {
  background:#111;
}

.cba-context-switch.is-on::after {
  transform:translateX(18px);
}

.cba-context-switch:disabled {
  cursor:not-allowed;
  opacity:.5;
}

.cba-context-notify-toggle {
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  min-width:34px;
  padding:0;
  border:1px solid #d0d5dd;
  border-radius:999px;
  background:#fff;
  color:#98a2b3;
  cursor:pointer;
}

.cba-context-notify-toggle svg {
  width:15px;
  height:18px;
  fill:currentColor;
}

.cba-context-notify-toggle.is-on {
  border-color:#b8860b;
  background:#fff8dc;
  color:#9a6700;
}

.cba-context-bell-status {
  padding:18px 4px;
  color:#667085;
  font-size:13px;
  line-height:1.5;
  text-align:center;
}

.cba-context-bell-auth {
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:12px;
}

.cba-context-bell-auth button,
.cba-context-bell-auth a {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:9px 14px;
  border:1px solid #111;
  border-radius:10px;
  background:#fff;
  color:#111;
  cursor:pointer;
  font-size:13px;
  font-weight:750;
  text-decoration:none;
}

.cba-context-bell-auth .is-primary {
  background:#111;
  color:#fff;
}

.cba-context-bell-reminder-highlight {
  border-radius:10px;
  background:#fff8dc;
  box-shadow:0 0 0 5px #fff8dc;
}

.cba-context-bell-toast {
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:100001;
  max-width:320px;
  padding:11px 14px;
  border-radius:10px;
  background:#111;
  color:#fff;
  opacity:0;
  transform:translateY(10px);
  transition:.2s ease;
  pointer-events:none;
}

.cba-context-bell-toast.is-visible {
  opacity:1;
  transform:translateY(0);
}

[data-context-bell-enabled="1"]
.cba-vote-reminder {
  display:none !important;
}

@media (max-width:600px) {
  .cba-context-bell-popover {
    width:calc(100vw - 20px);
    padding:14px;
    border-radius:14px;
  }
}

/* CBA_CONTEXT_BELL_DIRECT_STYLES_V2 */

button.cba-context-bell-trigger {
  background: transparent !important;
  padding: 0 !important;
  height: 40px !important;
  width: 40px !important;
  min-height: 40px !important;
  min-width: 40px !important;
  border: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
}

button.cba-context-bell-trigger:hover,
button.cba-context-bell-trigger:focus-visible,
button.cba-context-bell-trigger:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.cba-context-bell-trigger svg {
  display: block;
  width: 20px;
  height: 24px;
  fill: rgb(0 0 0);
}

.cba-context-bell-icon {
  display: block;
  width: 20px;
  height: 24px;
  overflow: visible;
}

.cba-context-bell-inner {
  fill: transparent;
  transition: fill .16s ease;
}

.cba-context-bell-stroke {
  fill: #000;
  transition: fill .16s ease;
}

.cba-context-bell-trigger.is-notifying
.cba-context-bell-inner,
.cba-context-notify-toggle.is-on
.cba-context-bell-inner {
  fill: #d92121;
}

.cba-context-bell-trigger.is-notifying
.cba-context-bell-stroke,
.cba-context-notify-toggle.is-on
.cba-context-bell-stroke {
  fill: #d92121;
}

.cba-context-notify-toggle,
.cba-context-notify-toggle.is-on,
.cba-context-notify-toggle:hover,
.cba-context-notify-toggle:focus-visible,
.cba-context-notify-toggle:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: inherit !important;
}

.cba-context-bell-dot {
  display: none !important;
}

[data-context-bell-enabled="1"]
.cba-business-vote-card
button[data-business-id][data-slot-id][disabled] {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  white-space: nowrap !important;
}

/* CBA_CONTEXT_BELL_PINK_STYLE_START */

/*
 * Private business-vote preview.
 *
 * Inactive:
 * - gray circular button
 * - white bell
 *
 * Active:
 * - #ff3c57 circular button
 * - white bell
 *
 * Popover:
 * - switches only
 * - notification bell buttons hidden
 */

[data-context-bell-enabled="1"]
.cba-business-vote-card {
  position: relative;
  box-sizing: border-box;
  padding-right: 68px;
}

/*
 * Base placement and inactive appearance.
 */
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 4;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 999px !important;
  background: #d0d5dd !important;
  box-shadow: none !important;

  color: #fff !important;
  opacity: 1 !important;
  transform: none !important;

  transition:
    background-color .16s ease,
    transform .16s ease !important;
}

/*
 * Inactive hover and focus.
 */
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger:not(.is-following):not(.is-notifying):hover,
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger:not(.is-following):not(.is-notifying):focus-visible {
  background: #c3cad5 !important;
  transform: scale(1.04) !important;
}

/*
 * Active state.
 */
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger.is-following,
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger.is-notifying,
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger.is-following:hover,
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger.is-notifying:hover,
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger.is-following:focus-visible,
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger.is-notifying:focus-visible {
  background: #ff3c57 !important;
}

[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger.is-following:hover,
[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger.is-notifying:hover {
  transform: scale(1.04) !important;
}

[data-context-bell-enabled="1"]
.cba-business-vote-card
button.cba-context-bell-trigger:focus-visible {
  outline: 3px solid rgba(255, 60, 87, .25);
  outline-offset: 3px;
}

/*
 * Bell dimensions.
 */
[data-context-bell-enabled="1"]
button.cba-context-bell-trigger
svg.cba-context-bell-icon {
  display: block !important;
  width: 22px !important;
  height: 25px !important;
  overflow: visible !important;
}

/*
 * White inner bell in both states.
 */
[data-context-bell-enabled="1"]
button.cba-context-bell-trigger
.cba-context-bell-inner,
[data-context-bell-enabled="1"]
button.cba-context-bell-trigger.is-following
.cba-context-bell-inner,
[data-context-bell-enabled="1"]
button.cba-context-bell-trigger.is-notifying
.cba-context-bell-inner {
  fill: #ffffff !important;
}

/*
 * Inactive outer SVG path blends into the gray circle.
 */
[data-context-bell-enabled="1"]
button.cba-context-bell-trigger
.cba-context-bell-stroke {
  fill: #d0d5dd !important;
}

/*
 * Active outer SVG path blends into the pink circle.
 */
[data-context-bell-enabled="1"]
button.cba-context-bell-trigger.is-following
.cba-context-bell-stroke,
[data-context-bell-enabled="1"]
button.cba-context-bell-trigger.is-notifying
.cba-context-bell-stroke {
  fill: #ff3c57 !important;
}

/*
 * Remove the old status dot.
 */
[data-context-bell-enabled="1"]
.cba-context-bell-trigger
.cba-context-bell-dot {
  display: none !important;
}

/*
 * Keep notification bell buttons removed from the popover.
 */
.cba-context-bell-popover
button.cba-context-notify-toggle {
  display: none !important;
}

/*
 * Popover rows remain label and switch.
 */
.cba-context-bell-popover
.cba-context-bell-row {
  grid-template-columns:
    minmax(0, 1fr)
    auto !important;

  column-gap: 12px;
}

.cba-context-bell-popover
.cba-context-bell-row > span:last-child:empty {
  display: none;
}

.cba-context-bell-popover
.cba-context-switch {
  justify-self: end;
}

/*
 * Preserve vote-button spacing.
 */
[data-context-bell-enabled="1"]
.cba-business-vote-card
.cba-business-vote-actions {
  padding-right: 0;
}

[data-context-bell-enabled="1"]
.cba-business-vote-card
button[data-business-id][data-slot-id][disabled] {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  white-space: nowrap !important;
}

[data-context-bell-enabled="1"]
.cba-business-vote-card
h3 {
  padding-right: 10px;
}

@media (max-width: 600px) {
  [data-context-bell-enabled="1"]
  .cba-business-vote-card {
    padding-right: 60px;
  }

  [data-context-bell-enabled="1"]
  .cba-business-vote-card
  button.cba-context-bell-trigger {
    top: 11px !important;
    right: 11px !important;
  }
}

/* CBA_CONTEXT_BELL_PINK_STYLE_END */

/* CBA_CONTEXT_BELL_PUBLIC_BALLOT_STYLE_START */

/*
 * Public category ballot.
 *
 * Layout:
 *   Vote/Voted button | notification bell
 *   countdown/message spans underneath both
 *
 * State:
 *   inactive = gray circle with white bell
 *   active   = pink circle with white bell
 */

[data-context-bell-enabled="1"]
.cba-category-ballot-card {
  position: relative;
}

/*
 * Remove the earlier corner-bell title reservation.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
.cba-category-ballot-content {
  padding-right: 0 !important;
}

/*
 * Convert the existing action area into a two-column grid.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
.cba-category-ballot-action {
  display: grid !important;

  grid-template-columns:
    minmax(0, 1fr)
    38px !important;

  grid-template-areas:
    "vote bell"
    "message message";

  align-items: center !important;
  column-gap: 10px !important;
  row-gap: 8px !important;
}

/*
 * Vote/Voted button occupies the main action column.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button[data-category-vote] {
  grid-area: vote;

  width: 100% !important;
  min-width: 0 !important;

  margin: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;

  white-space: nowrap !important;
}

/*
 * Place the contextual bell beside the vote button.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger {
  grid-area: bell;

  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;

  align-self: center !important;
  justify-self: end !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 999px !important;
  background: #d0d5dd !important;
  box-shadow: none !important;

  color: #fff !important;
  opacity: 1 !important;
  transform: none !important;

  transition:
    background-color .16s ease,
    transform .16s ease !important;
}

/*
 * Inactive hover/focus.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger:not(.is-following):not(.is-notifying):hover,
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger:not(.is-following):not(.is-notifying):focus-visible {
  background: #c3cad5 !important;
  transform: scale(1.04) !important;
}

/*
 * Active state.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger.is-following,
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger.is-notifying,
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger.is-following:hover,
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger.is-notifying:hover,
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger.is-following:focus-visible,
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger.is-notifying:focus-visible {
  background: #ff3c57 !important;
}

[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger:hover {
  transform: scale(1.04) !important;
}

[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger:focus-visible {
  outline: 3px solid rgba(255, 60, 87, .25);
  outline-offset: 3px;
}

/*
 * Bell icon sizing.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger
svg.cba-context-bell-icon {
  display: block !important;
  width: 22px !important;
  height: 25px !important;
  overflow: visible !important;
}

/*
 * White inner bell in both states.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger
.cba-context-bell-inner {
  fill: #ffffff !important;
}

/*
 * Outer path blends into the gray inactive background.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger
.cba-context-bell-stroke {
  fill: #d0d5dd !important;
}

/*
 * Outer path blends into the pink active background.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger.is-following
.cba-context-bell-stroke,
[data-context-bell-enabled="1"]
.cba-category-ballot-card
button.cba-context-bell-trigger.is-notifying
.cba-context-bell-stroke {
  fill: #ff3c57 !important;
}

[data-context-bell-enabled="1"]
.cba-category-ballot-card
.cba-context-bell-dot {
  display: none !important;
}

/*
 * Countdown or vote-result message sits beneath both controls.
 */
[data-context-bell-enabled="1"]
.cba-category-ballot-card
.cba-category-vote-message {
    min-height: auto;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
}

/*
 * Keep the approved switches-only popover.
 */
.cba-context-bell-popover
button.cba-context-notify-toggle {
  display: none !important;
}

.cba-context-bell-popover
.cba-context-bell-row {
  grid-template-columns:
    minmax(0, 1fr)
    auto !important;
}

.cba-context-bell-popover
.cba-context-switch {
  justify-self: end;
}

@media (max-width: 600px) {
  /*
   * Preserve the same button-and-bell row on mobile.
   */
  [data-context-bell-enabled="1"]
  .cba-category-ballot-card
  .cba-category-ballot-action {
    grid-template-columns:
      minmax(0, 1fr)
      38px !important;

    column-gap: 9px !important;
  }

  [data-context-bell-enabled="1"]
  .cba-category-ballot-card
  button.cba-context-bell-trigger {
    position: static !important;
    top: auto !important;
    right: auto !important;
  }
}

/* CBA_CONTEXT_BELL_PUBLIC_BALLOT_STYLE_END */

/*
 * CBA_GUEST_AUTH_POPOVER_STANDARD_V4
 *
 * Logged-out contextual nominee bell uses the Save your follows
 * ballot-popover appearance.
 */
.cba-context-bell-popover.is-guest-auth {
  width: min(370px, calc(100vw - 24px));
  padding: 22px;
  border: 1px solid #d8dde6;
  border-radius: 15px;
  background: #ffffff;
  color: #111111;
  box-shadow:
    0 18px 55px
    rgba(17, 17, 17, 0.24);
  text-align: left;
}

.cba-context-bell-popover.is-guest-auth
.cba-ballot-follow-auth-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f1f3;
  color: #596172;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cba-context-bell-popover.is-guest-auth
.cba-ballot-follow-auth-close:hover {
  background: #e2e4e8;
  color: #111111;
}

.cba-context-bell-popover.is-guest-auth h3 {
  margin: 0;
  padding-right: 34px;
  color: #111111;
  font-size: 20px;
  line-height: 1.25;
}

.cba-context-bell-popover.is-guest-auth p {
  margin: 8px 0 0;
  color: #596172;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.cba-context-bell-popover.is-guest-auth
.cba-ballot-follow-auth-popover-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
  gap: 10px;
}

.cba-context-bell-popover.is-guest-auth
.cba-ballot-follow-auth-popover-actions button,
.cba-context-bell-popover.is-guest-auth
.cba-ballot-follow-auth-popover-actions a {
  display: inline-flex;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid #111111;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.cba-context-bell-popover.is-guest-auth
.cba-ballot-follow-auth-signin {
  background: #ffffff;
  color: #111111;
}

.cba-context-bell-popover.is-guest-auth
.cba-ballot-follow-auth-signup {
  background: #111111;
  color: #ffffff;
}

.cba-context-bell-popover.is-guest-auth
.cba-ballot-follow-auth-signin:hover {
  background: #f4f5f7;
}

.cba-context-bell-popover.is-guest-auth
.cba-ballot-follow-auth-signup:hover {
  background: #292929;
  color: #ffffff;
}

@media (max-width: 640px) {
  .cba-context-bell-popover.is-guest-auth {
    width: calc(100vw - 24px);
  }
}
