/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any styles
 * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
 * file per style scope.
 *
 *= require_directory .
 *= require_self

 */


//custom styles
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

#flash-message-wrapper {
    margin-bottom: 2em;
}


.logo-type {
    font-size: 0.75em;
}

p {
    opacity: .9;
}

a:hover {
    text-decoration: none;
}

/***

TODO
- Respsonive headings (use about page to set)

***/

.hero {
    padding: 3em 0;

    @media screen and (max-width: 500px) {
      padding: 0em;
    }

    display:flex;

    h1 {
        font-weight: 300;
        font-size: 2em;
        line-height: 1.4em;

        @media screen and (max-width: 500px) {
          font-size:1.5em;
          margin-bottom:1em;
        }
    }

    @media screen and (max-width: 1000px) {
        flex-direction: column;
    }



    .hero-ctas {
        margin: 2em 0;

        @media screen and (max-width: 500px) {
          margin: 2em 0em 0em 0em;
        }

        .btn {
            background-color: #2E294E;
            color: #fff;
            font-weight: bold;
            padding: 1em 2em;
            position: relative;
            line-height: 1em;
            overflow: hidden;
            height: 3em;

            &:hover {
                background-color: #4D4482;
                color: #fff;
            }

            margin:.5em 0;
            @media screen and (max-width: 500px) {
              display:block;
            }
        }
    }


    .hero-nav {
        display: flex;
        flex-direction: column;
        font-size: 1.5em;
        @media screen and (max-width: 768px) {
            font-size:1.125em;
        }


        a {
            padding: 1.67em 0;
            color: #2E294E;
            transition: all .3s ease-in-out;
            display: flex;
            align-items: center;
            position: relative;
            text-decoration:none;


            &:after {
                content: '';
                background-image: url('icon_arrowright.svg');
                height: 16px;
                width: 16px;
                margin-left: auto;
            }

            &::before,
            &::after {
                opacity: 0;
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                height: 4px;
                transform: translateY(0px) scale(0.5);
                background: #2E294E;
                content: '';
                transition: transform 0.3s;
            }



            &:hover {
                color: #2E294E;


                &:hover::before,
                &:hover::after,
                &:focus::before,
                &:focus::after {
                    opacity: 1;
                    transform: translateY(0px) scale(1);
                }

            }
        }

        img {
            margin-right: 0.5em;
        }

        a:not(:last-child) {
            border-bottom: solid 1px #CDD7D6;
        }

        svg {
            margin-right: .88em;
        }
    }
}

.hero-small {
  @media screen and (max-width: 500px) {
    padding: 0;
  }

  h1 {
      @media screen and (max-width: 500px) {
        font-size:2em;
        margin-bottom:1em;
      }
  }

  p.lead {
    @media screen and (max-width: 500px) {
      margin: 0;
    }
  }
}

#about {
  @media screen and (max-width: 500px) {
    h3 {
      font-size:1.3em;
    }
  }
}

.generic-content-item {
  @media screen and (max-width: 500px) {
    h1 {
      font-size:1.8em;
    }

    h2 {
      font-size:1.5em;
    }

    h3 {
      font-size:1.3em;
    }
  }
}

.badge {
    text-transform: uppercase !important;
    letter-spacing: .44px !important;
    font-size: 8px !important;
    padding: 0.5em 1.5em !important;
    border-radius: 5px !important;
    font-weight: 400;

    &.accepted {
        background-color: #7ADFB7;
    }

    &.review-pending {
        background-color: #d1ecf1;
    }

    &.under-review {
        background-color: #fff3cd;
    }

    &.retracted {
        background-color: #ff3333;
    }
}

.badge-lang {
    font-size: 10px;
    padding: 0.25em 0.5em;
    line-height: 1;
    background-color: #D5D4DB;
    color: #2E294E;
    font-weight: 400;
    display: inline-block;

    a {
        transition: color .3s;
        color: #2E294E;

        &:hover {
            color: #007BFF;
            text-decoration: none;
        }
    }

}

.badge-count {
    background-color: white;
    padding: 0.25em 0.5em;
    font-size: 0.5em;
    line-height: 1;
    font-weight: 400;
    color: #696680;
    vertical-align: middle;
}

.submitted_by {
    margin-bottom: 1em;

    img {
        margin-right: .4em;
        border-radius: 2em;
    }
}

.doi {
    font-family: Courier;
    font-size: 1em;

    img {
        margin-right: .4em;
        border-radius: 2em;
    }
}

.tabnav-tab {
    padding: 1rem 1.6rem;
    background: #fff;
    color: #2E294E;
    transition: background-color .3s ease-out;

    &.selected {
        background: #2E294E;
        color: #fff;
        pointer-events: none;
    }

    &:hover {
        background: #EAE9ED;
        color: #2E294E;
        text-decoration: none;
    }
}

.footer {
    margin-top: 5em;
    text-align: center;
    border-top: solid 1px #CCCBD4;
    position: relative;

    .col-sm-6 {
        padding: 2em 1em;
    }

    @media screen and (max-width: 500px) {
      .col-sm-6:nth-of-type(1) {
        padding: 2em 1em 0.5em 1em;
      }

      .col-sm-6:nth-of-type(2) {
        padding: 0em 1em 2em 1em;
      }
    }

    @media screen and (min-width: 576px) {
        &:after {
            content: '';
            height: 100%;
            position: absolute;
            left: 50%;
            top: 0;
            border-left: solid 1px #CCCBD4;
        }
    }

    &:before {
        content: ('');
        background-image: url(image_path('logo_medium.png'));
        background-size: 80px 84px;
        width: 80px;
        height: 84px;
        position: absolute;
        top: -42px;
        left: 50%;
        transform: translateX(-40px);
        pointer-events: none;
        z-index: 10;
        animation: float 3s ease-in-out infinite;
    }

    p {
        max-width: 28em;
        margin: 0 auto;
    }

    img {
        margin: 1.5em;
    }
}

.cc {
    background-color: #2E294E;
    color: #D2C2FF;
    text-align: center;
    padding: 3em 0 3em 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    @media screen and (max-width: 500px) {
        padding: 1.5em 1em;
    }

    a {
        color: #8CBCF8;
    }

    a:hover{
        color: #CCFCFF;
    }

    p {
        margin: 0;
    }

    img {
        margin-bottom: 1.5em;
    }
}

.menu-btn {
    background: #2E294E;
    padding: 1em 1.5em;
    color: #fff;
    margin: 1em 0 0.5em 0;
    display: block;
    text-align: center;
    border-radius: 4px;
    border: 2px solid #2E294E;
    transition: all 0.2s ease-in;

    &:hover {
        color: #2E294E;
        background: #F4F4F6;
        text-decoration: none;
    }
}

.pagination_helper {
    margin: 0.5em auto;
    display: block;
}

.pagination {
    margin: 1em 0;
    width: 100%;

    &>* {
        padding: 0.5em;
        width: 100%;
        text-align: center;
        border-top: 1px solid #CDD7D6;
        border-left: 1px solid #CDD7D6;
        border-bottom: 1px solid #CDD7D6;
    }

    &:last-child {
        border-right: 1px solid #CDD7D6;
        border-radius: 0 0.25em 0.25em 0;
    }

    &:first-child {
        border-radius: 0.25em 0 0 0.25em;
    }

    .current {
        background: #fff;
    }

    a {
        color: #2E294E;

        &:hover {
            background: #fff;
        }
    }
}
@media screen and (max-width: 768px) {
    .media {
        display:block !important;
    }
}
.editor {

    .small {
        font-weight: bold;
        padding-bottom: 0.75em;
    }

    h5 {
        margin-bottom: 0.25em;
    }

    .editor-avatar {
        width: 4em;
        height: 4em;
        border-radius: 50%;
        margin-right: 1.5em;
        margin-bottom: 1em;
    }

}

/*
@keyframes float {
    0% {
        transform: translate(-40px, 0px);
    }

    50% {
        transform: translate(-40px, -6px);
    }

    100% {
        transform: translate(-40px, 0px);
    }
}*/

.menu {
    font-size: 14px;



    .menu-item {
        display: block;
        padding: .75em 0;


    }

    a {
        color: #2E294E;
        transition: transform .2s ease;


        &.selected {
            color: #007bff;
            text-decoration: none;
        }

        &:not(.selected):hover {
            text-decoration: none;
            transform: translateX(0.25em);
        }


    }
}

.sub-nav {
    position: sticky;
    top: 2em;
    font-size: 14px;
    background: #fff;
    padding: 1em 2em;
    margin: 1em 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px 0 rgba(46, 41, 78, 0.10);
}

.generic-content-item {
    background: #fff;
    padding: 2em 3em;
    margin: 0.75em 0;
    box-shadow: 0 2px 8px 0 rgba(46, 41, 78, 0.10);
    border-radius: 4px;

    @media screen and (max-width: 768px) {
        padding:2em 1.5em;
    }

    h1,
    h2 {
        border-bottom: 1px solid #EAE9ED;
        margin-bottom: 0.75em;
        padding-bottom: 0.25em;
    }



    p {
        margin-bottom: 1em;
    }

    img {
        max-width: 100%;


    }
}

.selected {
    .count-badge {
        background: #5B507A;
    }
}

.count-badge {
    display: inline-block;
    font-size: .75em;
    background: #F5F5F6;
    padding: .25em .5em;
    border-radius: .5em;
    margin-left: .5em;
}


// Temp place for bootstrap variables
$font-family-sans-serif:'Inter',
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
"Helvetica Neue",
Arial,
"Noto Sans",
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji" !default;
$body-bg: #F4F4F6;
$body-color:#2E294E;
$brand-primary: #2E294E;
$btn-primary-color: #fff !default;
$btn-primary-bg: $brand-primary !default;
$btn-primary-border: darken($btn-primary-bg, 5%) !default;


// Custom bootstrap variables must be set or imported *before* bootstrap

@import "bootstrap-4.3.1/bootstrap";

// Bootstrap overrides

@include media-breakpoint-up(lg) {
    .container {
        max-width: 90%;
        margin: 0 auto;
    }

}

@include media-breakpoint-down(md) {
    .container {
        width: 90%;
        max-width: none;
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
    }
}

@include media-breakpoint-down(sm) {
    .container {
        width:94%
    }
}

.paper-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.5em;
    height: calc(1.5em + 0.75rem + 2px); // same as bootstrap input height

    @include media-breakpoint-down(md){
        .form-inline {
            margin-top: 0 !important; // bootstrap forces this as important
            max-width: 50%
        }
    }
    @include media-breakpoint-down(sm){
        flex-direction: column;
        height: unset;

        .btn-group {
            width: 100%;
            display: flex;
            .tabnav-tab {
                flex-grow: 1;
                justify-content: center;
            }
        }

        .form-inline {
            width: 100%;
            max-width: unset;
            .input-group {
                width: 100%;
                margin-bottom: 0 !important; // bootstrap forces important
            }
        }
    }
}

.paper-list {
    margin-top: 1.5em;
    font-size: 14px;

    @include media-breakpoint-down(sm){
        margin-top: 0;
    }

    .paper-card {
        background: #fff;
        border-radius: .25em;
        padding: 1.5em 2em;
        box-shadow: 0 2px 8px 0 rgba(46, 41, 78, 0.10);
        margin-bottom: 1em;

        @include media-breakpoint-down(md) {
            padding: 0.75em 1em 0em 1em;
        }

    }

    .paper-meta {
        display: flex;
        flex-direction: column;
        justify-content: center;

        a {
            color: #007BFF;
        }

        @include media-breakpoint-down(md) {
            flex-direction: row;
            justify-content: space-between;
            margin-top: 1em;
            padding-top: 1em;
            border-top: 1px solid rgba(46, 41, 78, 0.10);
        }

        .btn {
            font-size: 12px;
            width: 10em;
            background: transparent;
            border: solid 1px #F4F4F6;
            display: inline-block;
            font-weight: 400;

            &:hover {
                background: #F4F4F6;
            }
        }
    }

    .time {
        font-size: 0.857em;
        color: rgba(46, 41, 78, 0.50);
        margin-left: 0.25em;
    }

    h2 {
        font-size: 1.285em;
        margin-top: 0.5em;
        display: flex;
        align-items: center;
    }

    a {
        transition: color .3s;
        color: #2E294E;

        &:hover {
            color: #007BFF;
            text-decoration: none;
        }
    }


}

.rss-dropdown {
    margin-left: .75em;

    .dropdown-toggle {
        &:after {
            display: none;
        }
    }
}

.btn-rss {
    background-color: #FFB500 !important;
}

.action-btn, .paper-btn, .btn.paper-submit {
    background-color: #2E294E;
    color: #fff;
    font-weight: bold;
    padding: 1em 2em;
    position: relative;
    line-height: 1em;
    overflow: hidden;
    height: 3em;
    @include transition(.35s ease all);

    &:hover {
        // line-height: 9em;
        background-color: #4D4482;
        color: #fff;
    }
}

.action-btn {
    margin-bottom: 15px;
}

.btn.orcid {
    background-color: #a6ce39 !important;
    font-weight: normal;
}

.btn-group {

    border: 1px solid #EAE9ED;
    font-size: 12px;

    .tabnav-tab {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;

        @include media-breakpoint-down(md){
            padding-left: 0.5em;
            padding-right: 0.5em;
        }

        @include media-breakpoint-down(sm){
            flex-direction: column;
            padding: 1em 1.5em;
        }


        &:first-of-type {
            border-radius: 0.25em 0 0 0.25em;
        }

        &:last-of-type {
            border-radius: 0 0.25em 0.25em 0;
        }
    }
}

/* link hover */

.feed-icon {
    &:hover {
        fill: red;
    }
}

.navbar {

    justify-content: space-between;

    .btn {
        padding: 1em 1.5em;
        background-color: #AECB54;
        color: #fff;
        font-size: 0.875em;
        white-space: nowrap
    }

    .active {
        color: #2E294E;
        font-weight: 700;

        @include media-breakpoint-down(md) {
            border-bottom: none;
        }
    }

}

.navbar-collapse {
    text-align: right;
    padding: 0 1em;

    @include media-breakpoint-down(md) {
        padding-bottom: 2em;
    }

}

.navbar-nav {
    align-items: center;

    @include media-breakpoint-down(md) {
        align-items: flex-end;
    }
}

.nav-link {
    padding: 1em !important;
    color: #2E294E;
    align-self: center;
    transition: background-color 0.5s ease, font-size 0.25s ease;
    white-space: nowrap;
    position: relative;

    &::before,
    &::after {
        opacity: 0;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 4px;
        transform: translateY(10px) scale(0.5);
        background: #2E294E;
        content: '';
        transition: transform 0.3s;
    }



    &:hover {
        @include media-breakpoint-down(md) {
            &:not(.orcid) {
                font-size: 1.25em;
            }
            transition: font-size 0.25s ease;
        }

        &:hover::before,
        &:hover::after,
        &:focus::before,
        &:focus::after {
            opacity: 1;
            transform: translateY(10px) scale(1);

            @include media-breakpoint-down(md) {
                opacity: 0;
            }
        }
    }

    @include media-breakpoint-down(md) {
        font-size: 1.125em;
        padding: 0 !important;
        height: 3rem;
        width: 100%;
        text-align: right;

        .active {
            background: white;
            color: #007BFF;
        }

        &.orcid {
            padding: 1em !important; // bootstrap forces this important
            margin-bottom: 0.5em;
            &:hover {
                color: #fff;
                border-color: #1f1d1d;
            }
        }
    }
}

/* animated menu icon */

/* remove navbar button styling */
.navbar-toggler {
    border: none;

    /* remove the blue outline when active or focused */
    &:active,
    &:focus {
        outline: 0;
    }

    /* basic styles for each icon bar */
    .icon-bar {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 1px;
        margin: 4px 0 4px 0;
        transition: all 0.2s;
        background-color: #2E294E;

        /* .navbar open top .icon-bar rotated down 45° */
        &:nth-of-type(1) {
            transform: rotate(45deg);
            transform-origin: 10% 10%;
        }

        /* .navbar open middle .icon-bar invisible */
        &:nth-of-type(2) {
            opacity: 0;
            filter: alpha(opacity=0);
        }

        /* .navbar open bottom .icon-bar rotated up 45° */
        &:nth-of-type(3) {
            transform: rotate(-45deg);
            transform-origin: 10% 90%;
        }

    }

    /* styles for when .navbar is closed */
    &.collapsed {

        .icon-bar {

            /* .navbar closed top .icon-bar no rotation - straight */
            &:nth-of-type(1) {
                transform: rotate(0);
            }

            /* .navbar open middle .icon-bar visible */
            &:nth-of-type(2) {
                opacity: 1;
                filter: alpha(opacity=100);
            }

            /* .navbar open bottom .icon-bar no rotation - straight */
            &:nth-of-type(3) {
                transform: rotate(0);
            }

        }

    }

}

.hero-small {
    display: flex;
    padding: 0em 0em 2em 0em;
    width: 100%;
    align-items: center;



    .hero-title {
        display: flex;
        align-items: center;
    }

    @include media-breakpoint-down(md) {

        font-size:14px;

        padding: 0em 0em 2em 0em;

        .sub-nav {
            position: relative;
        }



    }

    img {
        margin-right: 0.5em;
    }

    h1 {
        display: inline-block;


    }
}

header {
    margin-bottom: 4em;
    border-bottom: 1px solid rgba(46, 41, 78, 0.10);
    box-shadow: 0 2px 8px 0 rgba(46, 41, 78, 0.10);

    @include media-breakpoint-down(md) {
        margin-bottom: 2em;
    }
}

// Sortable tables

table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sorttable_nosort):after {
    content: " \25B4\25BE"
}

// Scope update banner
.scope-update-banner {
    margin-bottom: 1.5em;
    border-left: 4px solid #0c5460;

    .container {
        padding: 0;
    }

    .close {
        position: absolute;
        right: 1rem;
        top: 0.5rem;
    }
}
