/* 2026110403: responsive public, PDF and webmail placements. */
.pdf-tools-grid > .skymail-pdf-ad-row {
  grid-column: 1 / -1;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  clear: both;
}
.pdf-tools-grid > .skymail-pdf-ad-row[hidden] { display: none !important; }
.pdf-tools-grid > .skymail-pdf-ad-row .skymail-public-ad { margin-block: 1.25rem; }
.pdf-plugin-page.skymail-pdf-with-footer-ad {
  padding-bottom: calc(52px + var(--skymail-pdf-footer-space, 0px));
}
@media (max-width: 991.98px) {
  /* The configured mobile format stays 320px wide even inside a padded tool container. */
  .pdf-plugin-page .skymail-pdf-inline-ad {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    max-width: 100vw;
    margin-left: 0;
    margin-right: 0;
  }
}
.skymail-public-ad {
  width: min(970px, 100%);
  margin: 1rem auto;
  text-align: center;
}
.skymail-public-ad-label {
  display: block;
  margin-bottom: 0.25rem;
  color: inherit;
  font-size: 0.7rem;
  line-height: 1rem;
}
.skymail-public-ad-desktop { display: none; }
.skymail-public-ad[hidden], .skymail-public-pushup[hidden] { display: none !important; }
@media (max-width: 991.98px) {
  [data-skymail-public-slot][data-skymail-public-mobile="0"] { display: none !important; }
}
@media (min-width: 992px) {
  [data-skymail-public-slot][data-skymail-public-desktop="0"] { display: none !important; }
  .skymail-public-ad-desktop { display: block; }
  .skymail-public-ad-mobile { display: none; }
}
.skymail-ad-slot {
  position: relative;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto 0.75rem;
  background: transparent;
  text-align: center;
  color: var(--bs-body-color);
}
.skymail-ad-slot[hidden], .skymail-ad-slot [hidden] { display: none !important; }
/* Device choices must apply before the deferred ad script starts. */
@media (max-width: 991.98px) {
  .skymail-ad-slot[data-skymail-ad-mobile="0"],
  html[data-skymail-ad-provider-device="desktop"] .skymail-ad-slot:not(.skymail-ad-slot--pushup) { display: none !important; }
}
@media (min-width: 992px) {
  .skymail-ad-slot[data-skymail-ad-desktop="0"],
  html[data-skymail-ad-provider-device="mobile"] .skymail-ad-slot:not(.skymail-ad-slot--pushup) { display: none !important; }
}
.skymail-ad-label {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-block-end: 0.375rem;
  color: var(--bs-secondary-color, #7b8094);
  font-size: 0.7rem;
  line-height: 1rem;
}
.skymail-ad-remove {
  padding-block: 0.125rem;
  color: var(--bs-primary);
  font-size: inherit;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.skymail-ad-remove:hover { color: var(--bs-primary); text-decoration-thickness: 2px; }
.skymail-ad-remove:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.skymail-ad-provider { margin-inline: auto; }
.skymail-ad-slot .skymail-ad-premium {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 0;
  padding: 0.75rem 1rem;
  color: var(--bs-body-color);
  border: 1px solid rgba(var(--bs-primary-rgb, 13, 110, 253), 0.2);
  border-radius: 0.5rem;
  background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.06);
  box-shadow: none;
  text-decoration: none;
}
/* Override the legacy dark banner palette without overriding slot dimensions. */
html[data-bs-theme="dark"] .skymail-ad-slot .skymail-ad-premium,
body.dark-mode .skymail-ad-slot .skymail-ad-premium {
  color: var(--bs-body-color);
  border-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.2);
  background: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.06);
}
.skymail-ad-slot .skymail-ad-premium:hover {
  border-color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.06);
}
.skymail-ad-slot .emailn-adfree-copy { gap: 0.25rem; }
.skymail-ad-slot .emailn-adfree-cta {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  box-shadow: none;
  background: var(--bs-primary);
  color: var(--bs-primary-contrast, #fff);
  font-size: 0.8rem;
  white-space: nowrap;
}
.skymail-ad-slot .emailn-adfree-kicker { color: var(--bs-primary); font-size: 0.72rem; }
.skymail-ad-slot .emailn-adfree-title { font-size: 1rem; font-weight: 600; line-height: 1.3; }
html[data-bs-theme="dark"] .skymail-ad-slot .emailn-adfree-title,
body.dark-mode .skymail-ad-slot .emailn-adfree-title,
.skymail-ad-slot .emailn-adfree-title { color: var(--bs-body-color); }
.skymail-ad-slot .emailn-adfree-note { font-size: 0.8rem; }
html[data-bs-theme="dark"] .skymail-ad-slot .emailn-adfree-note,
body.dark-mode .skymail-ad-slot .emailn-adfree-note,
.skymail-ad-slot .emailn-adfree-note { color: var(--bs-secondary-color, #7b8094); }
.skymail-ad-slot--top {
  width: 100%;
  min-height: 1px;
  margin-bottom: 0;
}
.skymail-ad-slot--top[data-ad-visible="1"] { margin-bottom: 0.75rem; }
.skymail-ad-slot--wide { display: none; }
.skymail-ad-slot--sidebar { margin-block-start: 1rem; }
.skymail-ad-slot--sidebar .skymail-ad-premium,
.skymail-ad-slot--wide .skymail-ad-premium {
  width: 160px;
  max-width: 100%;
  height: 250px;
  margin-inline: auto;
  flex-direction: column;
  text-align: center;
  justify-content: center;
  padding: 1rem 0.75rem;
}
.skymail-ad-slot--sidebar .emailn-adfree-title,
.skymail-ad-slot--wide .emailn-adfree-title { font-size: 1rem; }
.skymail-ad-slot--sidebar .emailn-adfree-cta,
.skymail-ad-slot--wide .emailn-adfree-cta { max-width: 100%; white-space: normal; line-height: 1.2; }
.skymail-ad-slot--preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: auto;
  padding: 0.25rem 1rem 1rem;
}
.skymail-ad-slot--preview .skymail-ad-premium {
  flex: 0 0 250px;
  width: min(300px, 100%);
  height: 250px;
  margin-inline: auto;
  flex-direction: column;
  text-align: center;
  padding: 1.25rem;
}
/* The empty-view placement belongs above the list, never below its footer. */
.mail-flexbox > .skymail-ad-slot--preview {
  flex: 0 0 auto;
  padding: 0.25rem 0.75rem 0;
}
.mail-flexbox > .skymail-ad-slot--preview .skymail-ad-premium {
  flex: 0 0 auto;
  width: min(970px, 100%);
  height: 90px;
  flex-direction: row;
  padding: 0.75rem 1rem;
}
.skymail-ad-slot--pushup {
  position: fixed;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100vw;
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  margin: 0;
  padding: 0 2.5rem 0 0.5rem;
  box-sizing: border-box;
  z-index: 1040;
  background: var(--bs-body-bg, #fff);
  border: 0;
  box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.1);
}
.skymail-ad-slot--pushup .skymail-ad-label {
  position: absolute;
  inset-block-end: 100%;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding-inline: 0.375rem;
  line-height: 12px;
  background: var(--bs-body-bg, #fff);
}
.skymail-ad-slot--pushup .skymail-ad-premium {
  width: min(970px, 100%);
  height: 72px;
  min-height: 0;
  margin-inline: auto;
  padding-block: 0.375rem;
}
/* Refinery supplies the fixed wrapper, native height and close button itself.
   Do not clip, resize or re-parent the provider's creative. */
.skymail-ad-slot--pushup[data-ad-filled="1"] {
  position: static;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.skymail-ad-slot--pushup[data-ad-filled="1"] > .skymail-ad-label {
  position: fixed;
  inset-block-end: var(--pushup-safe, 0px);
  inset-inline-start: auto;
  inset-inline-end: calc(var(--skymail-ad-footer-right, 0px) + max(0.5rem, env(safe-area-inset-right)));
  transform: none;
  padding: 0.125rem 0.375rem;
  z-index: 10000;
}
/* A provider's close action must remove our adjacent link along with its ad. */
.skymail-ad-slot--pushup[data-ad-filled="1"]:not([data-ad-visible="1"]) > .skymail-ad-label { display: none; }
.skymail-ad-close {
  position: absolute;
  inset: 0.5rem 0.375rem auto auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--bs-border-color, #ddd);
  border-radius: 50%;
  color: var(--bs-body-color);
  background: var(--bs-body-bg, #fff);
  line-height: 24px;
  font-size: 1.3rem;
  z-index: 2;
  cursor: pointer;
}
.skymail-ad-close:focus-visible,
.skymail-ad-premium:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
body.folder-mobile-sidebar-open .skymail-ad-slot--pushup { display: none !important; }
@media (min-width: 992px) {
  .app-email-sidebar.collapsed .skymail-ad-slot--sidebar { display: none; }
}
@media (min-width: 1200px) {
  .skymail-ad-slot--pushup {
    inset-inline-end: var(--skymail-ad-footer-right, 0px);
    width: auto;
  }
  /* Position the provider's wrapper beside the rail without changing creative sizes. */
  .skymail-ad-slot--pushup [id^="r89-desktop-billboard-low"][id$="-wrapper"] {
    right: var(--skymail-ad-footer-right, 0px) !important;
  }
  .content-wrapper > .container-fluid > .wide-content-with-ad,
  .content-wrapper > .container-xxl > .wide-content-with-ad {
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }
  .content-wrapper > .container-fluid > .wide-content-with-ad > #mainContent,
  .content-wrapper > .container-xxl > .wide-content-with-ad > #mainContent {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
  }
  /* Keep the 160px creative inside the page at common laptop widths. */
  .content-wrapper > .container-fluid > .wide-content-with-ad > .skymail-ad-slot--wide {
    display: block;
    flex: 0 0 160px;
    width: 160px;
    margin: 0;
  }
  .content-wrapper > .container-xxl > .wide-content-with-ad > .skymail-ad-slot--wide {
    display: block;
    position: relative;
    inset: auto;
    flex: 0 0 160px;
    width: 160px;
    margin: 0;
  }
}
@media (max-width: 991.98px) {
  .app-email .app-email-sidebar.skymail-sidebar-with-ad {
    width: min(344px, 100%);
    inline-size: min(344px, 100%);
    flex-basis: min(344px, 100%);
    max-width: 100%;
    max-inline-size: 100%;
    inset-inline-start: -360px;
  }
  .app-email .app-email-sidebar.skymail-sidebar-with-ad.show { inset-inline-start: 0; }
  .app-email .app-email-sidebar.skymail-sidebar-with-ad .email-sidebar-scroll { padding-inline: 0; }
  .app-email .app-email-sidebar.skymail-sidebar-with-ad .email-sidebar-folders { padding-inline: 0.5rem; }
  .skymail-ad-slot--sidebar .skymail-ad-premium {
    width: min(300px, 100%); height: 120px; flex-direction: row; gap: 0.75rem; padding: 0.75rem;
  }
}
@media (max-width: 575.98px) {
  .skymail-ad-slot--pushup .skymail-ad-premium { gap: 0.625rem; padding-inline: 0.625rem; }
  .skymail-ad-slot--pushup .emailn-adfree-title { font-size: 0.9rem; }
  .skymail-ad-slot--pushup .emailn-adfree-note,
  .skymail-ad-slot--pushup .emailn-adfree-cta { display: none; }
}
