/* css styles */
body {
  background-color: aliceblue;
  background-size: 200px;
  background-position: 72% 80px;
  background-repeat: no-repeat;
}

.navbar {
  background-color: rgb(51, 118, 157);
  --bs-navbar-color: rgb(255, 255, 255);
}

/* Styling for the sidebar logo */
.sidebar-logo {
  padding: 15px;
  text-align: center;
}

/* Target all possible sidebar logo selectors */
.sidebar-logo img,
#quarto-sidebar .sidebar-logo img,
.sidebar-navigation .sidebar-logo img,
.sidebar img[src*="SAHPRA-logo"],
.sidebar-title img,
#quarto-sidebar img,
.sidebar-tools-main img {
  max-width: 90% !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 10px 15% 10px auto !important; /* This shifts the logo to the left */
  display: block !important;
}

/* Force logo container styling */
.sidebar-logo,
.sidebar-title,
.sidebar-tools-main,
#quarto-sidebar > div:first-child {
  padding: 15px !important;
  text-align: center !important;
  width: 100% !important;
}

/* Additional override for any image style inheritance */
#quarto-sidebar img {
  max-width: 90% !important;
  height: auto !important;
}

/* Custom styles for the user guide */
h2 {
  color: rgb(51, 118, 157);
  border-bottom: 1px solid rgb(51, 118, 157);
  padding-bottom: 0.2em;
  margin-top: 1.5em;
}

h3 {
  color: rgb(70, 130, 180);
  margin-top: 1.2em;
}

.steps {
  background-color: #f8f9fa;
  border-left: 4px solid rgb(51, 118, 157);
  padding: 1em;
  margin: 1em 0;
}

.note {
  background-color: #e2f0ff;
  border-left: 4px solid #3b82f6;
  padding: 1em;
  margin: 1em 0;
}

.warning {
  background-color: #fff3e0;
  border-left: 4px solid #f59e0b;
  padding: 1em;
  margin: 1em 0;
}

.tip {
  background-color: #f0f9ff;
  border-left: 4px solid #0ea5e9;
  padding: 1em;
  margin: 1em 0;
}

/* Image styling */
img {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 5px;
  margin: 10px 0;
  max-width: 100% !important;
  display: block;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

/* Force left alignment for all images */
img, 
figure img,
p img,
div img,
.screenshot,
.callout img,
.note img,
.warning img,
.tip img {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Only apply hover effect when not in Fancybox and not in logo */
img:not(.fancybox__img):not(.sidebar-logo img):hover {
  transform: scale(1.01);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
}

/* Screenshot specific styling */
.screenshot {
  max-width: 50% !important;
  display: block;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Add a clearfix to prevent text wrapping issues */
img::after {
  content: "";
  display: table;
  clear: both;
}

/* Add margin to paragraphs after images to prevent overlap */
img + p {
  margin-top: 15px;
  clear: both;
}

/* Remove hover effect and box styling for images in Fancybox */
.fancybox__container img {
  transform: none !important;
  box-shadow: none !important;
  cursor: default;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

/* Remove hover effects for logo */
.sidebar-logo img {
  transform: none !important;
  box-shadow: none !important;
  cursor: default;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.screenshot-caption {
  text-align: center;
  font-style: italic;
  color: #6c757d;
  margin-top: 0.5em;
  margin-bottom: 1.5em;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

th {
  background-color: rgb(51, 118, 157);
  color: white;
  padding: 12px;
  border: 1px solid #dee2e6;
}

td {
  padding: 10px;
  border: 1px solid #dee2e6;
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

/* Sidebar styling */
.sidebar-item {
  color: rgb(51, 118, 157);
}

.sidebar-item-text {
  font-weight: 500;
}

.sidebar-item-text.active {
  font-weight: 700;
  color: rgb(51, 118, 157);
}

/* Button styling in images */
.highlight-button {
  border: 2px solid #f59e0b;
  border-radius: 4px;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Release Notes specific styling */
.callout-note {
  margin-bottom: 1.5em !important;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 1em;
  background-color: #f8f9fa;
}

/* Styling for collapsible date sections in change log */
details summary {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3b82f6;
  padding: 10px 15px;
  margin: 10px 0;
  background-color: #e2f0ff;
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

details summary:hover {
  background-color: #d1e7ff;
}

details {
  margin-bottom: 20px;
}

details > div {
  padding: 0 15px;
}

/* Footer links styling */
.footer-links {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 265px; /* Match the sidebar width */
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 10px 15px;
  text-align: left;
  z-index: 1000;
}

.footer-links a {
  color: rgb(51, 118, 157);
  text-decoration: none;
  font-size: 0.9em;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Add padding to the bottom of the main content to prevent overlap with the footer */
main {
  padding-bottom: 50px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    background-position: 95% 80px;
    background-size: 150px;
  }
  
  .navbar {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .footer-links {
    width: 100%;
    text-align: center;
  }
}

/* Custom styles for release notes version hierarchy */
.patch-release .callout-note {
  margin-left: 20px;
  border-left-color: #6c5ce7 !important;
  background-color: #f1eeff !important;
}

/* Slightly different styling for the main version callouts */
.main-release .callout-note {
  border-left-color: #0984e3 !important;
  background-color: #e3f2fd !important;
}

/* Style the patch release summary to be visually different */
.patch-release summary {
  font-size: 1.3rem !important;
  background-color: #f1eeff !important;
  border-left-color: #6c5ce7 !important;
  margin-left: 20px !important;
}

/* Ensure the patch release details are also indented */
.patch-release {
  margin-left: 20px !important;
}

/* Custom callout class for patch notes to be used outside of details elements */
.callout-patch {
  margin-bottom: 1.5em !important;
  border: 1px solid #d4ceff !important;
  border-left: 4px solid #6c5ce7 !important;
  border-radius: 4px;
  padding: 1em;
  background-color: #f1eeff !important;
  margin-left: 20px !important;
}

/* Style for headings within patch callouts */
.callout-patch h3, 
.callout-patch h4, 
.callout-patch strong {
  color: #6c5ce7 !important;
}
