/* Opright platform announcements on the signed-in Home workspace. */
#appView #home .homeAnnouncementBanner {
  --announcement-accent: #9cdd8e;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  gap: 12px;
  align-items: start;
  margin: -6px 0 16px;
  padding: 15px 14px 15px 15px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 18px;
  background: linear-gradient(135deg, #010510 0%, #173b47 72%, #0b2f70 100%);
  color: #fff;
  box-shadow: 0 14px 32px rgb(1 5 16 / 14%);
}

#appView #home .homeAnnouncementBanner[hidden] {
  display: none !important;
}

#appView #home .homeAnnouncementBanner[data-priority="info"] {
  --announcement-accent: #a9e39d;
  background: linear-gradient(135deg, #173a43 0%, #1b5149 100%);
}

#appView #home .homeAnnouncementBanner[data-priority="urgent"] {
  --announcement-accent: #ffd596;
  background: linear-gradient(135deg, #452b30 0%, #6a3735 100%);
}

#appView #home .homeAnnouncementIcon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 12px;
  background: rgb(255 255 255 / 9%);
  color: var(--announcement-accent);
}

#appView #home .homeAnnouncementIcon svg {
  width: 19px;
  height: 19px;
}

#appView #home .homeAnnouncementCopy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#appView #home .homeAnnouncementEyebrow {
  color: var(--announcement-accent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1.3;
}

#appView #home #homeAnnouncementTitle {
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 14px;
  font-weight: 880;
  letter-spacing: -.15px;
  line-height: 1.25;
}

#appView #home .homeAnnouncementPreview {
  display: -webkit-box;
  overflow: hidden;
  color: #d3dfda;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#appView #home .homeAnnouncementView {
  justify-self: start;
  margin-top: 2px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--announcement-accent);
  font-size: 10px;
  font-weight: 850;
}

#appView #home .homeAnnouncementView[hidden] {
  display: none !important;
}

#appView #home .homeAnnouncementDismiss {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 10px;
  background: rgb(255 255 255 / 7%);
  color: #fff;
  font-size: 19px;
  line-height: 1;
}

body.home-announcement-open {
  overflow: hidden;
}

.homeAnnouncementDialog {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px));
}

.homeAnnouncementDialog[hidden] {
  display: none !important;
}

.homeAnnouncementDialogBackdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(9 23 34 / 55%);
  backdrop-filter: blur(4px);
}

.homeAnnouncementDialogCard {
  --announcement-dialog-accent: #4e9f4b;
  position: relative;
  width: min(540px, 100%);
  max-height: min(720px, calc(100dvh - 36px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  overflow: auto;
  border: 1px solid #e3eae4;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 90px rgb(7 25 37 / 30%);
}

.homeAnnouncementDialogCard[data-priority="urgent"] {
  --announcement-dialog-accent: #a55243;
}

.homeAnnouncementDialogHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 21px 14px;
  border-bottom: 1px solid #edf1ee;
}

.homeAnnouncementDialogLabel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--announcement-dialog-accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

.homeAnnouncementDialogLabel::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.homeAnnouncementDialogClose {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid #e3e9e4;
  border-radius: 11px;
  background: #f7f9f7;
  color: #33483d;
  font-size: 21px;
  line-height: 1;
}

.homeAnnouncementDialogBody {
  padding: 22px 22px 24px;
}

.homeAnnouncementDialogBody h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #010510;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 920;
  letter-spacing: -.8px;
  line-height: 1.12;
}

.homeAnnouncementDialogTime {
  display: block;
  margin-top: 8px;
  color: #78857f;
  font-size: 10px;
  font-weight: 720;
}

.homeAnnouncementDialogMessage {
  margin: 20px 0 24px;
  color: #43554d;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.homeAnnouncementDialogDone {
  width: 100%;
  min-height: 47px;
  border: 0;
  border-radius: 13px;
  background: #010510;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.homeAnnouncementView:focus-visible,
.homeAnnouncementDismiss:focus-visible,
.homeAnnouncementDialogClose:focus-visible,
.homeAnnouncementDialogDone:focus-visible {
  outline: 3px solid #7bcf70;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  #appView #home .homeAnnouncementBanner {
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    gap: 10px;
    margin-top: -5px;
    padding: 13px 11px 13px 13px;
    border-radius: 16px;
  }

  #appView #home .homeAnnouncementIcon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  #appView #home .homeAnnouncementDismiss {
    width: 30px;
    height: 30px;
  }

  .homeAnnouncementDialog {
    place-items: end stretch;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 0 0;
  }

  .homeAnnouncementDialogCard {
    width: 100%;
    max-height: calc(88dvh - env(safe-area-inset-top, 0px));
    border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .homeAnnouncementDialogCard {
    animation: homeAnnouncementIn 160ms ease-out;
  }

  @keyframes homeAnnouncementIn {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: none; }
  }
}

