/***************/
/*** Fonts ***/
/***************/

/* Import SciLifeLab’s font Lato. */

@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");
/* @import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap'); */

/*-----------------------------------------------------------------------------------*/

/***************/
/*** Colors ***/
/***************/

/* If you want to use a color not already listed here, add it here and call the variable in the code. 

SciLifeLab Brand colors
  use 1, 0.75, 0.50, or 0.25
  color: #A7C947, rgba(167, 201, 71, 1);  lime
  color: #491F53, rgba(73, 31, 83, 1);  grape, use as "color pop" or on smaller details
  color: #045C64, rgba(4, 92, 100, 1);  teal
  color: #4C979F, rgba(76, 151, 159, 1); aqua

  Complimentary colors
  color: #E5E5E5, rgba(229, 229, 229, 1); light grey
  color: #A6A6A6, rgba(166,166,166, 1); medium grey
  color: #3F3F3F, rgba(63,63,63,1); dark grey
*/

:root {
  --grape1: #491F53; /* used */
  --grape0_75: #77577E; /* unused */
  --grape0_50: #A48FA9; /* unused */
  --grape0_25: #D2C7D4; /* used */
  --lime1: #A7C947; /* likely unused */
  --lime0_75: #BDD775; /* unused */
  --lime0_50: #D3E4A3; /*unused */
  --lime0_25: #E9F2D1; /* used */
  --teal1: #045C64; /* used */
  --teal0_75: #43858B; /* unused */
  --teal0_50: #82AEB2; /* unused */
  --teal0_25: #C0D6D8; /* used */
  --aqua1: #4C979F; /* used */
  --aqua0_75: #79B1B7; /* used */
  --aqua0_50: #A6CBCF; /* unused */
  --aqua0_25: #D2E5E7; /* used */
  --light_grey: #E5E5E5; /* used */
  --medium_grey: #A6A6A6; /* likely unused */
  --dark_grey: #3F3F3F; /* used */
}
/*-------------------------------------------------------------------------------*/

/***  sr-only class hides an element to all devices except screen readers ***/
.sr-only {
  position:absolute;
  left:-10000px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
/*-------------------------------------------------------------------------------*/


/******************************************************/
/*** Styling of default tags applied to 'all' pages ***/
/******************************************************/

body {
  font-family: "Lato", Times, Arial;
}

p.big {
  font-size: 18px;
}

h1 {
  font-size: 2rem;
  margin-top: 0.67em;
}

h2 {
  font-size: 1.5rem;
  margin-top: 0.83em;
}
h3 {
  font-size: 1.17rem;
  margin-top: 1em;
}
h4 {
  font-size: 1rem;
  margin-top: 1.33em;
}
/*-------------------------------------------------------------------------------*/

/***************/
/*** Buttons ***/
/***************/

/* Use teal button on actions such as 'Close', 'Send' etc 
   Use light-grey button for 'See details' on resource's cards 
   Use expandable button (light grape) for all expandable elements giving more data type information */

   button {
    border: none;
    background: none;
    margin-bottom: 1em;
  }
  
  .btn:focus {
    box-shadow: none;
  }
  
  .btn-round {
    /* rounded-pill */
    border-radius: 50rem;

    /* px-4 (Horizontal padding: 1.5rem) */
    padding-left: 1.5rem;
    padding-right: 1.5rem;

    /* py-2 (Vertical padding: 0.5rem) */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .btn-round .bi {
    /* margin-left of text from icon */
    margin-left: 0.5rem;
  }

  .btn-grape {
    color: white;
    font-weight: bold;
    background-color: var(--grape1);
    border-color: var(--grape1);
    border-style: solid;
    border-width: medium;
    margin-left: 0.5rem;
  }
  .btn-grape:hover {
    color: white;
    border-color: white;
    border-style: solid;
    border-width: medium;
  }

  .btn-teal {
    color: white;
    font-weight: bold;
    background-color: var(--teal1);
    border-color: var(--teal1);
    border-style: solid;
    border-width: medium;
  }
  .btn-teal:hover {
    color: white;
    border-color: white;
    text-decoration: underline;
    border-style: solid;
    border-width: medium;
  }

  .btn-light-grey {
    background-color: var(--light_grey);
    color: black;
    border-color: var(--light_grey);
    border-style: solid;
    border-width: medium;
  }
  .btn-light-grey:hover {
    background-color: var(--light_grey);
    color: black;
    border-color: white;
    text-decoration: underline;
    border-style: solid;
    border-width: medium;
  }
  
  .btn-expandable {
    background-color: var(--grape0_25);
    color: black;
    border-color: var(--grape0_25);
    border-style: solid;
    border-width: medium;
    margin-bottom: 0;
  }
  .btn-expandable:hover {
    background-color: var(--grape0_25);
    color: black;
    border-color: white;
    text-decoration: underline;
    border-style: solid;
    border-width: medium;
  }
  
  .btn-expandable .collapse {
    margin-bottom: 1rem;
  }

  #btn-back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: none;
  }

/* Code copy button
    Styles for markdown formatting of inline code and code blocks and copy to clipboard button */
  pre {
    color: black;
    background-color: rgba(229,229,229,0.5);
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    line-height: 1.5;
    padding: 5px;
    white-space : pre-wrap !important;
  }

  .clipboard {
    display: flex;
    justify-content: flex-end;
  }

  .clipboard-button {
    position: absolute;   /* put the button inside code block */
    background-color: rgba(229,229,229,0);
    border-width: 0px
  }
  .clipboard-button:hover {
    cursor: pointer;
    background-color: var(--light_grey);
  }
/*-----------------------------------------------------------------------------------*/
  
/*************/
/*** Links ***/
/*************/

/* All links - add underline on hover
   Links in text: 
     Do not differentiate between internal and external links on styling */

a {
  text-decoration: none;
  color: blue;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3.2px;
  color: darkblue;
}

.dropdown-item.hover, .dropdown-item:active {
  color: white;
  text-decoration: none;
  background-color: var(--light_grey);
}

/* Links not in text 
      Differentiate between internal and external links by using diffrent bootstrap icons: 
        Internal - bi-arrow-right-square
        External - bi-box-arrow-up-right; add 'target="_blank"' so that they open up in new tabs

      Use link-teal for standalone links on white background. 
      Use link-black for standalone links on colored background. */

.link-teal {
  color: var(--teal1);
}
.link-teal:hover {
  color: var(--teal1);
  text-decoration: underline; 
}
.link-black {
  color: black;
}
.link-black:hover {
  color: black;
  text-decoration: underline; 
}

/* Nav links */
.navbar-light .navbar-nav .nav-link:hover {
  color: var(--dark_grey);
  text-decoration: none;
}
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .nav-link:active {
  text-decoration: none;
}

/* Use only for table of content and listing resources in end of phase and topic pages */
.list-link a {
  color: var(--teal1);
}

/* Styling of the 'site map', telling the visitor on which page they are in relation to homepage */
.breadcrumb-item a {
  color: var(--teal1);
}
.breadcrumb-item.active {
  color: black;
}

/* Header links on homepage */
h1 a {
  color: var(--aqua1);
}
h1 a:hover {
  color: var(--teal1);
}

/* Homepage right side card links */
.card-body-style {
  color: black;
  text-decoration: none;
}

.card-body-style:hover {
  color: black;
  text-decoration: none;
}

/* Topic links */
.cont-links a {
  color: var(--teal1);
  font-weight: bold;
}
.cont-links a:hover,
.cont-links a:focus,
.cont-links a:active {
  color: var(--teal1);
  text-decoration: underline;
}

/* Footer */
.footer-link {
  color: var(--teal1);
  font-weight: bold;
}
.footer-link:hover {
  color: var(--teal1);
}
/*-----------------------------------------------------------------------------------*/

/*************************************/
/*** Top of pages / header styling ***/
/*************************************/

.header {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 1.5rem 0;
  color: white;
  box-shadow: rgba(17, 17, 26, 0.1) 0px 4px 16px,
    rgba(17, 17, 26, 0.05) 0px 8px 32px;
}

@media all and (min-width: 992px) {
  .mobile-navbar {
    display: none;
  }
}

@supports ((position: -webkit-sticky) or (position: sticky)) {
  .sticky-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0px;
    z-index: 1030; /* Set as higher than sticky-top2 so the navbar & dropdowns stack ABOVE the breadcrumbs */
  }
  .sticky-top2 {
    position: -webkit-sticky;
    position: sticky;
    top: 7rem;
    z-index: 1020;
  }
  .sticky-top3 {
    position: -webkit-sticky;
    position: sticky;
    top: 9rem;
    z-index:0;
  }
}
html {
  scroll-padding-top: 11rem; /* height of sticky header */
}

/* Headers on resources page */
[class^="resources-header-"] {
  font-size: 1.17rem;
  font-weight: bold;
  text-decoration: none;
}

.resources-header-training {
  color: var(--grape1);
}

.resources-header-training:hover {
  color: var(--grape1);
  text-decoration: underline;
}
.resources-header-guidance {
  color: var(--teal1);
}

.resources-header-guidance:hover {
  color: var(--teal1);
  text-decoration: underline;
}
.resources-header-tool {
  color: var(--aqua1);
}

.resources-header-tool:hover {
  color: var(--aqua1);
  text-decoration: underline;
}

/* Data type guide header styling */
/* The colored header strip */
.resources-data-header-strip {
    margin: -1rem -1rem 1rem -1rem; /* Offsets the p-3 padding of the parent */
    padding: 0.5rem 1rem;
    color: white;
    font-weight: bold;
    font-size: 1.17rem;
    letter-spacing: 0.05em;
}

/* Background Colors for Headers */
.bg-repository { background-color: #491F53; }
.bg-metadata { background-color: #045C64; }
.bg-fileformat { background-color: #4C979F; }

/* Title Colors matching the types */
.text-repository { color: #491F53 !important; font-weight: 700; }
.text-metadata { color: #045C64 !important; font-weight: 700; }
.text-fileformat { color: #4C979F !important; font-weight: 700; }

/* Ensure the title link doesn't lose color on hover */
.resources-data-header.text-repository:hover,
.resources-data-header.text-metadata:hover,
.resources-data-header.text-fileformat:hover {
    filter: brightness(1.2);
    text-decoration: underline;
}

.resources-data-header {
  font-size: 1.17rem;
  font-weight: bold;
  margin-top: 0.5rem;
  margin-bottom: 1.33rem;
  text-decoration: none;
}

/* Get support, About, Contact */
.navbar-nav.navbar-top li:not(:first-child) a {
  padding-left: 0.6rem;
}
.navbar-nav.navbar-top li:not(:last-child) a span {
  border-right: 1px solid #ccc;
  padding-right: 0.6rem;
}

/* Main menu */
.navbar-light .navbar-nav .nav-main-menu {
  color: var(--teal1);
}

.navbar-light .navbar-nav .nav-main-menu:hover,
.navbar-light .navbar-nav .nav-main-menu:focus,
.navbar-light .navbar-nav .nav-main-menu:active {
  color: var(--teal1);
  font-weight: bold;
  text-decoration: none;
}

/* Make the double chevron icon bold when the Resources menu link is hovered */
.nav-main-menu:hover .bi-chevron-double-down {
  font-weight: bold;
  -webkit-text-stroke: 0.5px currentColor; /* Perfect fallback boost for icon fonts */
}

/*-----------------------------------------------------------------------------------*/

/* Clear floats after the columns */ /* not used? */
.row:after {
  content: "";
  display: table;
  clear: both;
}
/*-----------------------------------------------------------------------------------*/

/*****************/
/*** RDM wheel ***/
/*****************/
.ratio.main_rdm {
  padding-bottom: 10%;
}

@media (min-width: 200px) {
  .ratio.main_rdm {
    padding-bottom: 85%;
  }
}

@media (min-width: 500px) {
  .ratio.main_rdm {
    padding-bottom: 50%;
  }
}
/*-----------------------------------------------------------------------------------*/

/*************/
/*** Cards ***/
/*************/

/* Used as background for e.g. displaying topics */
.cards {
  background-color: var(--teal0_25);
}

.clickable-card {
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.clickable-card:hover {
    background-color: var(--light_grey); /* Light grey highlight */
    border-color: var(--medium_grey);
}

/* Homepage right side cards */
.support {
  background-color: var(--lime0_25);
}
.dataPlatform {
  background-color: var(--aqua0_25);
}
.training {
  background-color: var(--grape0_25);
}

/* Contributors cards */
.card-img-top {
  height: 9rem;
  width: 9rem;
}

/* Resources cards */
.resource-card-training {
  border-color: var(--grape1) !important;
}
.resource-card-tool {
  border-color: var(--aqua1) !important;
}
.resource-card-guidance {
  border-color: var(--teal1) !important;
}

/* Data Resource card Styling */
.resource-card-data {
    border: 1px solid #000000 !important; /* Black frame */
    overflow: hidden; /* Ensures the header matches the card's rounded corners */
    display: flex;
    flex-direction: column;
}

.related-resources {
    margin-left: 0.5rem; /* Align with card content */
    font-size: smaller;
}
/*-----------------------------------------------------------------------------------*/

/*************/
/*** Icons ***/
/*************/

.bi-camera-video-fill {
  font-size: 24px;
}
/*-----------------------------------------------------------------------------------*/

/*************/
/*** Badge ***/
/*************/

.new {
  background-color: var(--lime0_75);
  color: black;
  vertical-align: 0.15em;
  margin-left: 2px;
}

/*-----------------------------------------------------------------------------------*/

/*********************/
/*** Search filter ***/
/*********************/

.resources-search-filter  {
  color: black;
  font-size: 1.17rem;
  margin-top: 1em;
}

/* Custom styling of search input and checkboxes on Resources & Search page */

input[type="text"]:focus {
  border-color: var(--teal1);
  box-shadow: 0 0 0 0.2rem var(--aqua0_50);
}
input[type="checkbox"]:checked { 
  background-color: var(--teal1);
  border-color: var(--teal1);
  box-shadow: 0 0 0 0.2rem var(--aqua0_50);
}
input[type="checkbox"]:focus { 
  box-shadow: 0 0 0 0.2rem var(--aqua0_50);
}


/*-----------------------------------------------------------------------------------*/

/************/
/*** Tabs ***/
/************/

/* Tabs used for Resources page */

.nav-tabs .nav-item:nth-child(1) .nav-link {
  background-color: var(--grape1);
  color: white;
  font-size: larger;
  border-bottom-color: black;
}
.nav-tabs .nav-item:nth-child(1) .nav-link.active {
  border-color: black;
  border-bottom-color: transparent;
  background-color: white;
  color: var(--grape1);
  font-size: larger;
}
.nav-tabs .nav-item:nth-child(2) .nav-link {
  background-color: var(--teal1);
  color: white;
  font-size: larger;
  border-bottom-color: black;
}
.nav-tabs .nav-item:nth-child(2) .nav-link.active {
  border-color: black;
  border-bottom-color: transparent;
  background-color: white;
  color: var(--teal1);
  font-size: larger;
}
.nav-tabs .nav-item:nth-child(3) .nav-link {
  background-color: var(--aqua1);
  color: white;
  font-size: larger;
  border-bottom-color: black;
}
.nav-tabs .nav-item:nth-child(3) .nav-link.active {
  border-color: black;
  border-bottom-color: transparent;
  background-color: white;
  color: var(--aqua1);
  font-size: larger;
}

.tab-content {
  border: 1px solid black;
  border-top: transparent;
  padding: 15px;
}

/*-----------------------------------------------------------------------------------*/

/***********************/
/*** Data Type Guide ***/
/***********************/

/* Styling the dropdown focus state to match inputs and checkboxes */
#studyTypeSelect:focus, 
.form-select:focus {
  border-color: var(--teal1);
  outline: 0; /* Removes the browser's default black outline */
  box-shadow: 0 0 0 0.2rem var(--aqua0_50); /* Your custom aqua halo */
}

/*-----------------------------------------------------------------------------------*/
