/*!
Theme Name: NERD$
Theme URI: https://littlerhino.io
Author: Little Rhino
Author URI: https://littlerhino.io
Description: Custom theme for NERD$.
Version: 1.0.0
Requires PHP: 7.3
*/

/**
Global.
**/
body {
    margin: 0;
}

#page {
    font-size: 16px;
    font-family: 'Heebo', sans-serif;
}

#page h1, #page h2, #pageh3, #page h4, #page h5, #page h6 {
    font-family: 'Lusitana', serif;
    font-weight: bold;
}

a, a:visited {
    color: #3fb3e3;
}

a, .smooth-hover {
    transition: all 0.2s ease;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
}

main#primary {
    padding-top: 88px;
}

/**
Layout.
**/
.wp-block-columns, .wp-block-columns.alignfull, .wp-block-columns.alignwide {
    width: 100%;
    margin: 0 auto;
}

.wp-block-columns {
    max-width: 1240px;
}

.wp-block-columns.alignwide {
    max-width: 1540px;
}

.wp-block-columns.alignfull {
    max-width: 100%;
}

.wp-block-column {
    padding: 30px 15px !important;
}

/**
Header.
**/
div.mobile-menu, nav#mobile-nav {
    display: none;
}

header#masthead .wp-block-columns div, header#masthead .wp-block-columns nav {
    flex: 1;
}

header#masthead .branding {
    max-width: 80px;
}

header#masthead .branding img {
    max-width: 100%;
    height: auto;
    float: left;
}

.header-cta a {
    border-radius: 4px;
    background: #88ca41;
    text-decoration: none;
    color: #fff;
    padding: 10px 25px;
    position: relative;
    top: 0;
}

.header-cta a:hover {
    top: -2px;
}

header#masthead .branding, header#masthead nav.navigation, header#masthead .header-cta {
    display: flex;
    align-items: center;
}

ul#main-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

header#masthead .header-cta {
    max-width: 185px;
    justify-content: flex-end;
}

header#masthead {
    height: 120px;
    display: flex;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid rgb(0 0 0 / 20%);
}

header#masthead .wp-block-columns {
    height: 100%;
}

ul#main-menu li a {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    color: #fff;
}

ul#main-menu li a:hover {
    opacity: 0.6;
}

.hamburger-inner, .hamburger-inner:after, .hamburger-inner:before {
    background: #13b7e5;
}

div#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: rgb(255 255 255 / 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

div#loading-overlay.active {
    display: flex;
}

/**
Views.
**/
.nerds-view-head {
    display: flex;
}

.nerds-view-head > div {
    flex: 1;
}

.nerds-view-button {
    max-width: 200px;
    text-align: right;
}

.nerds-view-row {
    display: grid;
    grid: auto-flow dense/1fr 1fr;
    grid-gap: 30px;
    padding: 0px;
    margin: 0 0 30px 0;
}

.nerds-data-card {
    border: 1px solid rgb(0 0 0 / 0.05);
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 10px 10px -10px rgb(0 0 0 / 40%);
}

.nerds-data-card h3, .nerds-data-card p {
    margin: 0;
    text-transform: uppercase;
    opacity: 0.5;
}

.nerds-data-card p {
    font-size: 14px;
}

.nerds-data-card h3 {
    line-height: 0.6;
}

.nerds-data {
    margin: 15px 0 0 0;
}

.nerds-data-column {
    display: grid;
    grid: auto-flow dense/1fr 1fr;
    grid-gap: 10px;
    padding: 10px 15px;
}

.nerds-data-value {
    text-align: right;
}

.nerds-data-large {
    font-weight: bold;
    font-size: clamp(22px,5vw,32px);
}

.nerds-data-single span {
    opacity: 0.5;
    font-weight: bold;
}

.nerds-data-span, .nerds-data-span_2 {
    height: 24px;
}

.nerds-data-dist_average, .nerds-data-state_average {
    display: flex;
    align-items: center;
}

.nerds-data-dist_average span, .nerds-data-state_average span {
    flex: 1;
    opacity: 1;
}

.nerds-data-dist_average span.special-data, .nerds-data-state_average span.special-data {
    text-align: right;
}

.nerds-data-dist_average span.special, .nerds-data-state_average span.special {
    color: #253468;
}

.nerds-data-dist_average .special, 
.nerds-data-state_average .special, 
.nerds-data-dist_average .special-data, 
.nerds-data-state_average .special-data {
    font-weight: normal;
}

.nerds-view-table table {
    width: 100%;
    border: 1px solid rgb(0 0 0 / 0.05);
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 10px 10px -10px rgb(0 0 0 / 40%);
}

.nerds-view-table th {
    text-align: left;
}

.nerds-view-table thead th {
    border-bottom: 2px solid #88ca41;
    min-width: 200px;
}

.nerds-view-table td.monetary {
    text-align: right;
}

.dataTables_scroll {
    overflow-x: auto;
}

.nerds-view-table th {
    color: #253468;
}

svg.sort-icon {
    height: 12px;
}

.sorting_desc svg.sort-icon path#sort-down {
    fill: #11b6e4;
}

.sorting_asc svg.sort-icon path#sort-up {
    fill: #11b6e4;
}

.nerds-view-table th, .nerds-view-table td {
    padding: 7.5px 15px;
    white-space: nowrap;
}

.nerds-view-table tbody tr:nth-child(even) {
    background: rgb(0 0 0 / 10%);
}

.nerds-view-table {
    margin-bottom: 30px;
}

div#form-table_filter, div#form-table_length {
    padding: 15px 0;
    display: inline-block;
}

div#form-table_length {
    margin-right: 15px;
}

select[name="form-table_length"] {
    padding: 3px;
}

div#form-table_filter input {
    margin-left: 7px;
    border: 1px solid rgb(0 0 0 / 20%);
    padding: 5px;
    border-radius: 4px;
}

div#form-table_paginate {
    padding: 30px 0 15px;
    text-align: right;
}

a#form-table_previous,
a.paginate_button.current,
a.paginate_button,
a#form-table_next {
    background: #1d396a;
    color: #fff;
    padding: 5px 15px; 
    border-radius: 4px;
    margin: 2px;
    cursor: pointer;
}

a.paginate_button.current {
    background: #e5e5e5;
    color: rgb(0 0 0 / 30%);
}

a#form-table_previous:hover,
a.paginate_button:hover,
a#form-table_next:hover {
    background: #11b6e4;
}

.nerds-view-body.nerds-view-sidebar {
    display: flex;
}

.nerds-view-body.nerds-view-sidebar > div {
    flex: 1;
    max-width: 65%;
}

.nerds-view-table {
    margin-right: 15px;
}

.nerds-view-side {
    max-width: 350px;
    padding-top: 57px;
}

/**
Data footer.
**/
a.nerds-form-btn.footer-docs-btn {
    background: #11b6e4;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    padding: 6px 12px;
}

.nerds-data-footer {
    margin: 6.5px 0 0;
}

.nerds-data-footer-docs {
    text-align: right;
}

a.nerds-form-btn.footer-docs-btn:hover {
    background: #88ca41;
}

/**
Tooltip.
**/
.nerds-tooltip-message {
    position: absolute;
    display: none;
}

.nerds-tooltip {
    display: inline-block;
    vertical-align: -webkit-baseline-middle;
}

.nerds-tooltip-icon {
    font-size: 24px;
    padding: 5px 15px;
    color: orange;
    transform: scale(0.9);
    transition: all 0.2s ease;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    cursor: pointer;
}

.nerds-tooltip:hover .nerds-tooltip-icon {
    transform: scale(1);
}

.nerds-tooltip-message {
    position: relative;
    background: #fff;
    display: block;
    max-width: 100%;
    width: auto;
    margin-top: 5px;
    font-size: 14px;
    border: 1px solid rgb(0 0 0 / 20%);
    padding: 9.5px;
    border-radius: 4px;
}

.nerds-tooltip-message p:first-child {
    margin-top: 0;
}

.nerds-tooltip-message p:last-child {
    margin-bottom: 0;
}

.nerds-tooltip-message p strong {
    color: orange;
}

/**
Footer.
**/
.site-info {
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
}

footer#colophon {
    padding: 60px 30px;
}

.nerds-logos img {
    max-width: 150px;
}

.site-info {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-info > div {
    flex: 1;
}

ul#footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

ul#footer-menu, .footer-social {
    display: flex;
    align-items: center;
}

.footer-copyright {
    max-width: 150px;
border-left: 1px solid #3fb3e3;border-right: 1px solid #3fb3e3;}

ul#footer-menu li a {
    text-decoration: none;
    color: #fff;
    padding: 0px 15px;
    border-right: 1px solid rgb(255 255 255 / 0.2);
}

ul#footer-menu li:last-child a {
    border-right: none;
}

.footer-social a {
    font-size: 16px;
    color: #fff;
    padding: 0px 15px;
}

.footer-social a:first-child {
    margin-left: 15px;
}

.site-info a:hover {
    color: #88ca41 !important;
}

span#nerds-reset {
    background: rgb(0 0 0 / 20%);
    color: rgb(0 0 0 / 40%);
    border-radius: 4px;
    padding: 4px 15px;
    text-transform: uppercase;
    margin: 0 auto;
    display: block;
    width: 100px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
}

span#nerds-reset:hover {
    background: #11b6e4;
    color: #fff;
    transform: translate(0px, -3px);
}

/**
Media Queries.
**/
@media screen and (max-width:1240px) {

    .branding {
        padding: 0 0 0 30px;
    }
    
    .header-cta, .mobile-menu {
        padding: 0 30px 0 0;
    }

}

@media screen and (max-width:991px) {

    .nerds-view-row {
        grid: auto-flow dense/1fr;
    }

}

@media screen and (max-width:900px) {

    div.mobile-menu, nav#mobile-nav {
        display: flex;
        align-items: center;
    }

    nav.navigation, .header-cta {
        display: none !important;
    }

    nav#mobile-nav {
        position: fixed;
        width: 100%;
        height: 100vh;
        top: 0;
        left: 100vw;
        z-index: 999;
        background: #fff;
    }
    
    nav#mobile-nav .menu-main-menu-container, nav#mobile-nav ul#main-menu {
        display: flex !important;
        flex-direction: column;
        height: 100%;
        width: 100%;
    }
    
    nav#mobile-nav ul#main-menu {
        justify-content: center;
    }
    
    header#masthead > .wp-block-columns {
        position: relative;
        z-index: 9999;
    }
    
    header#masthead {
        display: block !important;
    }

    .mobile-menu {
        justify-content: flex-end;
    }

    nav#mobile-nav ul#main-menu li a {
        font-weight: bold;
        display: block;
        border-bottom: 1px solid rgb(0 0 0 / 10%);
        padding: 20px;
        font-size: 18px;
    }
    
    nav#mobile-nav ul#main-menu li {
        display: block;
        width: 100%;
        text-align: center;
    }

    .nerds-view-body.nerds-view-sidebar {
        flex-direction: column;
    }

    .nerds-view-body.nerds-view-sidebar > div {
        max-width: 100%;
    }
    
}

@media screen and (max-width:650px) {

    .nerds-view-head {
        flex-direction: column;
    }
    
    button#data-download, a#data-download, button#data-view {
        margin: 0 0 30px 0 !important;
    }
    
    .nerds-view-button {
        text-align: left;
    }
    
    .nerds-view-name h2 {
        margin-bottom: 5px;
    }
    
    .nerds-data-column {
        grid: auto-flow dense/1fr;
        border-bottom: 1px solid rgb(0 0 0 / 20%);
    }
    
    .nerds-data-value {
        text-align: left;
    }
    
    .nerds-data-column:last-child {
        border-bottom: 0;
    }

    .nerds-data-footer {
        grid: auto-flow dense / 1fr;
    }
    
    .nerds-data-footer-docs {
        grid-column: 1;
        grid-row: 1;
    }

    .nerds-tooltip:hover .nerds-tooltip-message {
        left: 30px;
        margin: 15px 0 0;
        max-width: 70vw;
    }

}