/* --- LINK CUSTOMIZATION --- */

/* Make links Confluence‑like blue and underline when hovered */
#main-content a,
#main-content a:link,
#main-content a:visited {
  color: #0052cc !important;        /* Confluence blue */
  text-decoration: none !important; /* no underline until hover */
}

#main-content a:hover,
#main-content a:focus,
#main-content a:active {
  color: #0052cc !important;
  text-decoration: underline !important;
}

/* --- HEADING CUSTOMIZATION --- */

/* Use larger spacing above H1–H5 */
#main-content h1,
#main-content h2,
#main-content h3,
#main-content h4,
#main-content h5 {
  margin-top: 0 !important;       /* remove theme/browser default spacing */
  padding-top: 25px !important;   /* fixed size, same for all headings */
}

/* Make H2 headings larger and heavier */
#main-content h2 {
  font-size: 35px !important; /* adjust size as needed */
  font-weight: 600 !important; /* semi-bold */
}

/* Make H3 headings larger */
#main-content h3 {
  font-size: 28px !important;
}

/* Custom style for H6 */
#main-content h6 {
  /* text appearance */
  font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-weight: 400 !important;    /* remove bold */
  color: #777 !important;         /* grey color */

  /* spacing */
  margin-top: 0 !important;       /* remove spacing above */
  margin-bottom: 0 !important;    /* reset default bottom margin */
  padding-bottom: 50px !important;/* custom spacing below */
}

/* Remove anchor icon from H6 */
#main-content h6 .article__content__content__anchor--link-icon {
  display: none !important;
}

/* --- CHILDREN DISPLAY MACRO CUSTOMIZATION --- */

/* Remove default accordion container styling */
.accordion.megaAccordion.conf-macro.output-block {
  border: none !important;
  border-radius: 0 !important;
  margin: 1em 0 !important;
  padding: 0 0 0 2em !important; /* shorthand with left indent */
  background: transparent !important;
  display: block !important;
  list-style: disc outside !important;
}

/* --- FIRST-LEVEL PAGES --- */
.accordion.megaAccordion > .accordion-item {
  display: list-item !important;
  list-style-type: disc !important;
  margin: 0 0 0.5em 0 !important;  /* vertical spacing only */
  padding-left: 8px !important;    /* bullet-to-text spacing */
  border: none !important;
  background: transparent !important;
  font: inherit !important;        /* shorthand for font-family, size, weight */
  line-height: 1.5 !important;
}

/* First-level links */
.accordion.megaAccordion > .accordion-item > a.accordion-title {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font: inherit !important;
  line-height: inherit !important;
}

/* --- NESTED PAGES --- */
.megaAccordion__item--with-children__children__item {
  display: list-item !important;
  list-style-type: circle !important; /* hollow bullet */
  margin: 0 0 0.5em 1.5em !important;
  padding-left: 8px !important;
  border: none !important;
  background: transparent !important;
  font: inherit !important;
  line-height: 1.5 !important;
}

/* Nested links */
.megaAccordion__item--with-children__children__item > a[rel="subsection"] {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font: inherit !important;
  line-height: inherit !important;
}

/* Remove "read more" icons globally */
.accordion.megaAccordion .icon--read-more,
.megaAccordion__item--with-children__read-more-arrow {
  display: none !important;
}

/* Prevent expand icons from overlapping the link */
.accordion.megaAccordion .accordion-item a.accordion-title.toggle {
  position: relative !important;
  display: inline-block !important;
  padding-right: 1.2em !important;
}

.accordion.megaAccordion .accordion-item a.accordion-title.toggle .icon--expand {
  right: 0 !important;
  left: auto !important;
}

/* --- CODE BLOCK MACRO CUSTOMIZATION --- */

/* Hide the language label */
.code-macro__language {
  display: none !important;
}

/* Compact outer margins of the code block */
.code-macro {
  margin: 0.25em 0 !important;
}

/* Reset spacing on .code-toolbar (removes grey gap) */
.code-toolbar {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;   /* remove extra top padding */
  display: block !important;
}

/* Compact <pre> but keep horizontal padding & line numbers */
.code-macro pre {
  margin: 0 !important;
  padding: 0.5em 0.5em 0.5em 3.5em !important; /* top, right, bottom, left */
  line-height: 1.4;
}

/* Keep line numbers aligned */
pre.line-numbers {
  counter-reset: linenumber 0;
}

/* Float Copy button in corner */
.code-toolbar .toolbar {
  position: absolute !important;
  top: 0.25em !important;   /* aligned with first code line */
  right: 0.5em !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
  z-index: 10;
}

/* --- ALLOW TEXT TO FILL MORE OF THE ARTICLE AREA --- */

/* Top-level text and panels */
#main-content > p,
#main-content > blockquote,
#main-content > p ~ .panel-macro,
#main-content .conf-macro.output-block[data-macro-name="sp-pagelayout"] .sp-grid-cell > p,
#main-content .conf-macro.output-block[data-macro-name="scroll-conditional-content"] > p {
  max-width: 90% !important;
  margin-right: auto !important;
}

/* Standalone panels (not inside lists) */
#main-content .panel-macro:not(ul .panel-macro):not(ol .panel-macro),
#main-content .panel:not(ul .panel):not(ol .panel) {
  max-width: 90% !important;
  margin-right: auto !important;
}

/* Paragraphs inside Panel macros */
.panelContent p {
  max-width: 100% !important;
}

/* Remove extra bottom margin from Panel macros */
.panel .panelContent p:last-child {
  margin-bottom: 0 !important;
}

/* Top-level lists */
#main-content ul,
#main-content ol {
  max-width: 87% !important;
  margin-right: auto !important;
}

/* Nested list items and their content */
#main-content li ul,
#main-content li ol,
#main-content li p {
  max-width: 100% !important;
  margin-right: auto !important;
}

/* --- REMOVE LOGO FROM SPACE BLOCKS ON HOME PAGE --- */

/* Hide the logo inside each tile (space block) */
.tile img {
    display: none !important;
}

/* Center space names inside tiles */
.tile.tile--compact {
    display: flex;
    flex-direction: column;      /* stack content vertically */
    justify-content: center;     /* vertical centering */
    align-items: center;         /* horizontal centering */
    text-align: center;          /* center multi-line text */
    height: 100px;               /* keep the height you set */
    padding: 20px;               /* padding you already applied */
}

/* Adjust space description font size */
.tile.tile--compact p.tile__description {
    font-size: 14px;
    margin-top: 12px;
}

/* --- FLASHING DOT NEXT TO VERSION AND VARIANT PICKERS --- */

li.picker.picker--scroll.is-dropdown-submenu-parent.opens-left:has(> ul.variants-picker) > a,
li.picker.picker--scroll.is-dropdown-submenu-parent.opens-left:has(> ul.versions-picker) > a {
  position: relative;
}

li.picker.picker--scroll.is-dropdown-submenu-parent.opens-left:has(> ul.variants-picker) > a::before,
li.picker.picker--scroll.is-dropdown-submenu-parent.opens-left:has(> ul.versions-picker) > a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  background-color: #ffbf00;
  border-radius: 50%;
  animation: pulse 1.5s infinite; /* the duration of the pulse and the number of cycles */
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.4); }
}