@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

/* OHIF Theme */

@layer base {
  :root {
    --highlight: 191 74% 63%;
    --background: 236 62% 5%;
    --foreground: 0 0% 98%;
    --card: 236 62% 5%;
    --card-foreground: 0 0% 98%;
    --popover: 219 90% 15%;
    --popover-foreground: 0 0% 98%;
    --primary: 214 98% 60%;
    --primary-foreground: 0 0% 98%;
    --secondary: 214 66% 48%;
    --secondary-foreground: 200 50% 84%;
    --muted: 234 64% 10%;
    --muted-foreground: 200 46% 65%;
    --accent: 217 79% 24%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --input: 236 45% 21%;
    --ring: 214 98% 60%;
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
    --radius: 0.5rem;
  }

  .dark {
    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 214 98% 60%;
    --primary-foreground: 0 0% 98%;
    --secondary: 0 0% 14.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;
    --accent: 0 0% 14.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --input: 236 45% 21%;
    --ring: 214 98% 60%;
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
  }
}

/* ORIGINAL THEME for comparison and testing

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 72.22% 50.59%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5% 64.9%;
    --radius: 0.5rem;

    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
  }


  .dark {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 85.7% 97.3%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;

    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
  }
}

*/

/* Theme Copy Example

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 224 71.4% 4.1%;
    --card: 0 0% 100%;
    --card-foreground: 224 71.4% 4.1%;
    --popover: 0 0% 100%;
    --popover-foreground: 224 71.4% 4.1%;
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 210 20% 98%;
    --secondary: 220 14.3% 95.9%;
    --secondary-foreground: 220.9 39.3% 11%;
    --muted: 220 14.3% 95.9%;
    --muted-foreground: 220 8.9% 46.1%;
    --accent: 220 14.3% 95.9%;
    --accent-foreground: 220.9 39.3% 11%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 20% 98%;
    --border: 220 13% 91%;
    --input: 220 13% 91%;
    --ring: 262.1 83.3% 57.8%;
    --radius: 0.5rem;
    --chart-1: ;
    --chart-2: ;
    --chart-3: ;
    --chart-4: ;
    --chart-5: ;
  }

  .dark {
    --background: 224 71.4% 4.1%;
    --foreground: 210 20% 98%;
    --card: 224 71.4% 4.1%;
    --card-foreground: 210 20% 98%;
    --popover: 224 71.4% 4.1%;
    --popover-foreground: 210 20% 98%;
    --primary: 263.4 70% 50.4%;
    --primary-foreground: 210 20% 98%;
    --secondary: 215 27.9% 16.9%;
    --secondary-foreground: 210 20% 98%;
    --muted: 215 27.9% 16.9%;
    --muted-foreground: 217.9 10.6% 64.9%;
    --accent: 215 27.9% 16.9%;
    --accent-foreground: 210 20% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 20% 98%;
    --border: 215 27.9% 16.9%;
    --input: 215 27.9% 16.9%;
    --ring: 263.4 70% 50.4%;
    --chart-1: ;
    --chart-2: ;
    --chart-3: ;
    --chart-4: ;
    --chart-5: ;
  }
}

*/

h2.section-header {
  @apply py-4 text-2xl font-normal text-white;
}

h3.section-header {
  @apply py-3 text-xl text-white;
}

.playground-row {
  @apply bg-card mb-6 flex flex-row flex-wrap rounded-md border py-10;
}

.example {
  @apply flex-initial px-6;
}

.example2 {
  @apply flex-initial px-4;
}

/* Additional CSS edits to components */

/* Tooltip */

.TooltipContent[data-side='bottom'] {
  animation-name: slideDown;
}

/* Custom CSS to hide default number input arrows */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  @apply appearance-none;
}

input[type='number'] {
  -moz-appearance: textfield; /* For Firefox */
}

.navbar__item {
  display: flex;
  align-items: center;
}

.navbar__item svg {
  margin-right: 5px;
  display: inline-block;
  vertical-align: middle;
}

/* stylelint-disable docusaurus/copyright-header */
/**
 * Any CSS included here will be global. The classic template
 * bundles Infima by default. Infima is a CSS framework designed to
 * work well for content-centric websites.
 */
/* You can override the default Infima variables here. */
/* https://infima.dev/docs/utilities/colors */
/* https://docs.theochu.com/docusaurus/styling/ */
:root {
  --ifm-color-primary: #25c2a0;
  --ifm-color-primary-dark: rgb(33, 175, 144);
  --ifm-color-primary-darker: rgb(31, 165, 136);
  --ifm-color-primary-darkest: rgb(26, 136, 112);
  --ifm-color-primary-light: rgb(70, 203, 174);
  --ifm-color-primary-lighter: rgb(102, 212, 189);
  --ifm-color-primary-lightest: rgb(146, 224, 208);
  --ifm-font-color-base: #474747;
  --ifm-color-primary: #0151d9;
  --ifm-color-primary-dark: #0149c3;
  --ifm-color-primary-darker: #0145b8;
  --ifm-color-primary-darkest: #013998;
  --ifm-color-primary-light: #0159ef;
  --ifm-color-primary-lighter: #015dfa;
  --ifm-color-primary-lightest: #1d71fe;
  --ifm-color-secondary: #e8f7f7;
  --ifm-code-font-size: 95%;
  --ifm-background-color: #ffffff;
  --ifm-zoom-image-background-color: #ffffffe5;
  --ifm-background-surface-color: #ffffff;
  --ifm-menu-color: #1e427e;
  --ifm-code-background: #e8f7f7;
  --ifm-toc-border-color: #ffffff;
  --ifm-footer-background-color: #000000;
  --ifm-table-stripe-background: #f4fbfb;
  --ifm-color-warning: #e9e489;
  --ifm-alert-color: #333333;
  --ohif-color-border: #7bb2ce;
  --site-primary-hue-saturation: 167 68%;
  --site-primary-hue-saturation-light: 167 56%; /* do we really need this extra one? */
}

html[data-theme='dark'] .header-github-link:before {
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
    no-repeat;
}

html[data-theme='dark'] {
  --ifm-menu-link-sublist-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="15px" height="15px" viewBox="0 0 24 24"><path fill="rgba(0,0,0,0.4)" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path></svg>');
  --ifm-color-primary: #5acce6;
  --ifm-color-primary-dark: #3ec3e2;
  --ifm-color-primary-darker: #30bfe0;
  --ifm-color-primary-darkest: #1da4c3;
  --ifm-color-primary-light: #76d5ea;
  --ifm-color-primary-lighter: #84d9ec;
  --ifm-color-primary-lightest: #ade6f3;
  --ifm-font-color-base: #ffffff;
  --ifm-color-secondary: #050719;
  --ifm-blockquote-color: #7bb2ce;
  --ifm-background-color: #080b2b;
  --ifm-zoom-image-background-color: #080b2be5;
  --ifm-background-surface-color: #080b2b;
  --ifm-menu-color: #7bb2ce;
  --ifm-toc-link-color: #7bb2ce;
  --ifm-code-background: #1c296d;
  --ifm-toc-border-color: #080b2b;
  --ifm-menu-color-active: #ffffff;
  --ifm-footer-background-color: #000000;
  --ifm-table-stripe-background: #060920;
  --ifm-color-warning: #f1c55a;
  --ifm-alert-color: #000000;
  --ohif-color-border: #3a3f99;
}

.medium-zoom-overlay {
  background: var(--ifm-zoom-image-background-color) !important;
}

.header-github-link:hover {
  opacity: 0.6;
}
.header-github-link:before {
  content: '';
  width: 24px;
  height: 24px;
  display: flex;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
    no-repeat;
}
/*
.docusaurus-highlight-code-line {
  background-color: rgb(72, 77, 91);
  display: block;
  margin: 0 calc(-1 * var(--ifm-pre-padding));
  padding: 0 var(--ifm-pre-padding);
}
*/

/* Typography updates */

html {
  font-size: 1em;
}

body {
  font-family: 'Inter', sans-serif;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--ifm-color-primary);
  font-weight: 400;
  font-family: 'Inter', sans-serif;
}

blockquote {
  border-left: 3px solid #4042af;
}

/* Temporary Type Size Changes */

article header h1 {
  font-size: 2.6rem !important;
}

article h2 {
  font-size: 1.85rem !important;
}

article header h3 {
  font-size: 1.5rem !important;
}

/* Remove navigation shadow */

.navbar {
  box-shadow: none;
}

/* Navigation color and type updates */

.footer {
  background-color: #000000;
  color: #ffffff;
}

.footer a {
  color: #7bb2ce;
}

.footer a:hover {
  color: #ffffff;
  text-decoration: none;
}

.menu {
  font-weight: 400;
  font-size: 0.9rem;
}

.table-of-contents {
  font-size: 0.8rem;
  font-weight: 600;
}

.menu {
  padding-top: 2rem !important;
}

.menu__link--active {
  color: var(--ifm-menu-color-active);
  font-weight: 600;
}

.table-of-contents__link:hover,
.table-of-contents__link:hover code,
.table-of-contents__link--active,
.table-of-contents__link--active code {
  color: var(--ifm-menu-color-active);
  text-decoration: none;
  font-weight: 600;
}

.badge--secondary {
  --ifm-badge-background-color: var(--ifm-color-secondary);
  --ifm-badge-border-color: var(--ifm-badge-background-color);
  color: var(--ifm-color-primary);
  border: 1px solid var(--ohif-color-border);
}

/* Alerts */

.alert {
  font-size: 0.9rem;
  padding: 10px;
}

.alert--secondary {
  --ifm-alert-background-color: var(--ifm-color-secondary);
  --ifm-alert-color: var(--ifm-font-color-base);
}

.button--secondary:not(.button--outline) {
  --ifm-button-background-color: #e8f7f7;
}

.admonition-icon svg {
  fill: #0151d9;
}

.table-of-contents__left-border {
  border-left: #013998;
}

.footer__col:first-of-type {
  flex-grow: 2;
  margin-right: 20%;
}

.footer_logo {
  margin-top: 0;
}

.docusaurus-highlight-code-line {
  background-color: rgb(206, 208, 211);
  display: block;
  margin: 0 calc(-1 * var(--ifm-pre-padding));
  padding: 0 var(--ifm-pre-padding);
}

/* If you have a different syntax highlighting theme for dark mode. */
html[data-theme='dark'] .docusaurus-highlight-code-line {
  /* Color which works with dark mode syntax highlighting theme */
  background-color: rgb(100, 100, 100);
}

/* .DocSearch {
  display: none;
} */

/* Footer logo MGH */

@media (max-width: 1200px) {
  #mgh-logo {
    margin-right: 100px;
    width: 300px;
  }
}

@media (max-width: 480px) {
  #mgh-logo {
    margin-right: 10px;
    width: 300px;
  }
}

.dropdown-separator {
  margin: 0.3rem 0;
}

.dropdown-archived-versions {
  font-size: 0.875rem;
  padding: 0.2rem 0.5rem;
}

.code-block-error-line {
  background-color: #ff000020;
  display: block;
  margin: 0 calc(-1 * var(--ifm-pre-padding));
  padding: 0 var(--ifm-pre-padding);
  border-left: 3px solid #ff000080;
}

.new-badge::after,
.deprecated-badge::after {
  font-size: 11px;
  @apply inline-flex items-center justify-center rounded-sm;
  @apply ml-1.5 px-1 py-0;
}

.new-badge::after {
  content: '';
  @apply bg-red-300 text-red-500;
  @apply dark:bg-blue-900 dark:text-blue-100;
}

div[class^='announcementBar_'] {
  --site-announcement-bar-stripe-color1: hsl(var(--site-primary-hue-saturation) 85%);
  --site-announcement-bar-stripe-color2: hsl(var(--site-primary-hue-saturation) 95%);
  background: repeating-linear-gradient(
    35deg,
    var(--site-announcement-bar-stripe-color1),
    var(--site-announcement-bar-stripe-color1) 20px,
    var(--site-announcement-bar-stripe-color2) 10px,
    var(--site-announcement-bar-stripe-color2) 40px
  );
  font-weight: 700;
}

/* #__docusaurus {
  height: 100%;
} */

.dropdown-separator {
  border-top: 1px solid #808080;
}

/* flex items , center */
.dropdown__link {
  display: flex;
  align-items: center;
}

.footer__link-item {
  display: flex;
  align-items: center;
}

/* add proper ui link styling */

/* Bullet point styling */
ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

ul li {
  margin-bottom: 0.5rem;
}

/* Nested bullet points */
ul ul {
  list-style-type: circle;
  margin: 0.5rem 0;
}

/* For documentation bullet points specifically */
.markdown ul {
  list-style-type: disc;
  padding-left: 1.5rem;
}

.markdown ul li {
  margin-bottom: 0.5rem;
}

/* Markdown link styling */
.markdown a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.markdown a:hover {
  color: #0051a3;
  text-decoration: underline;
}

/* Dark mode link styling */
html[data-theme='dark'] .markdown a {
  color: #66b3ff;
}

html[data-theme='dark'] .markdown a:hover {
  color: #99ccff;
}

/* Horizontal rule styling */
.markdown hr {
  height: 1px;
  border: none;
  background: linear-gradient(to right, #0066cc, #66b3ff);
  margin: 2rem 0;
  opacity: 0.6;
}

/* Dark mode horizontal rule */
html[data-theme='dark'] .markdown hr {
  background: linear-gradient(to right, #66b3ff, #99ccff);
}

/* Markdown code block styling */
.markdown pre {
  font-size: 0.9rem;
}

.theme-code-block {
  font-size: 0.9rem;
}

/* Target both light and dark themes */
[data-theme='light'] .theme-code-block,
[data-theme='dark'] .theme-code-block {
  font-size: 0.9rem;
}

/* Dropdown menu positioning and interaction fixes */
.dropdown {
  position: relative;
}

.dropdown__menu {
  top: 100%;
  margin-top: 0;
  padding-top: 0.5rem;
}

/* Add a hover area to prevent menu from disappearing */
.dropdown__menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

/* Ensure menu stays visible while hovering */
.dropdown:hover .dropdown__menu,
.dropdown__menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-doc-version-banner {
  display: none;
}
