/*
Tesco Blue: #00539f
light blue: #007eb3;

Normal text: #666666;
Headings: #333333;

Clubcard yellow: #fcd700
Tesco red: #e81c2d
 */

@font-face {
    font-family: 'Tesco Modern';
    font-weight: 100 400;
    src: url('TESCOModern-regular.woff') format('woff');
}

@font-face {
    font-family: 'Tesco Modern';
    font-weight: 500 900;
    src: url('TESCOModern-bold.woff') format('woff');
}

.hidden {
    display: none;
}

body {
    font-family: "Tesco Modern", sans-serif;
    color: #666666;
}

form {
    margin: 0 5vw;
}

fieldset {
    margin: 1vw;
}

legend {
    color: #000000;
}

label {
    display: block;
}

label.inline {
    display: inline-block;
}

input,select,textarea {
    font-family: "Tesco Modern", sans-serif;
}

input:not([type="image"], [type="range"], [type="checkbox"], [type="radio"]),textarea,select {
    font-size: large;
    width: 25em;
}

input[type=submit] {
    display: block;
    font-size: larger;
    padding: 0 3em;
}

input[type=submit],input[type=reset],input[type=button] {
    color: white;
    background-color: #00539f;
}

input[disabled] {
    background-color: #cccccc !important;
}

h1,h2,h3,h4,h5,h6 {
    color: #333333;
}

a, a:visited {
    color: #00539f;
}

a:hover, a:active {
    color: #007eb3;
}

h1.page-title {
    color: #00539f;
    font-weight: bold;
}

h1.page-title::after {
    content: '.';
    color: #e81c2d;
}

nav {
    display: flex;
    height: 3em;
    overflow: visible;
    line-height: 3em;
    background-color: #f0f0f0;
}
nav>section {
    display: flex;
    flex-direction: row;
}
nav>section#section-tabs {
    flex-grow: 1;
}
nav>section.right-controls {
    flex-grow: 0;
    display: flex;
    flex-direction: column;
    height: fit-content;
    cursor: pointer;
}
nav>section.right-controls>h2 {
    font-size: medium;
    display: block;
    padding: 0 2em;
    margin: 0;
    vertical-align: middle;
    text-align: center;
}

nav>section#profile {
    flex-grow: 0;
}

nav>section>ul {
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: left;
    list-style-type: none;
    margin: 0;
    padding: 0;
}
nav>section>ul>li {
    display: flex;
}
nav>section>ul>li>a {
    display: block;
    padding: 0 1em;
    vertical-align: middle;
    text-align: center;
    border-bottom: 0.1em solid transparent;
}
nav>section>ul>li>a.selected {
    border-bottom-color: #00539f;
}

nav>section.dropdown>h2::after {
    content: '\25BE';
}
nav>section.dropdown>ul {
    display: none;
}
nav>section.dropdown:hover>ul,nav>section.dropdown:focus>ul,nav>section.dropdown:focus-within>ul {
    display: block !important;
}

main {
    max-width: 90vw;
    margin: 0 2vw;
    min-height: 80vh;
}

div#filter-controls {
    margin: 1em 0;
}

input#table-filter {
    font-size: medium;
    min-width: 50%;
    height: 2em;
    font-family: "Tesco Modern", sans-serif;
}

table {
    margin: 1em 0;
    font-size: small;
    table-layout: auto;
    border-collapse: collapse;
    width: 100%;
}

table>tbody {
    border-bottom: #666666 1px solid;
    border-top: #666666 1px solid;
    border-collapse: collapse;
}

table>tbody>tr:nth-child(odd) {
    background-color: #f0f0f0;
}

table td, table th {
    padding: 8px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

table th {
    font-weight: bold;
}

table td.wrap-text {
    white-space: normal;
    word-break: break-word;
}

div.input-with-info {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

div.input-with-info > input,
div.input-with-info > textarea,
div.input-with-info > select {
    flex: 0 0 auto;
}

abbr.info-icon, span.info-icon {
    cursor: help;
    text-decoration: none;
    margin-left: 0;
    color: #0055a4;
    font-size: 1.2em;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

abbr.info-icon:hover, span.info-icon:hover {
    color: #007eb3;
}

/* Custom tooltip for Chrome compatibility */
span.info-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 0.5em 1em;
    border-radius: 0.5em;
    white-space: normal;
    width: 300px;
    text-align: left;
    font-size: 0.9em;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    pointer-events: none;
}

span.info-icon::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 0.5em solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

span.info-icon:hover::before,
span.info-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

dl.client {
    display: grid;
    grid-template-columns: auto 1fr;
    list-style: none;
    padding: 0;
    margin: 0;
}

dl.client>dt, dl.client>dd {
    padding: 10px;
    margin: 0;
}

dl.client>dt:nth-of-type(odd),dl.client>dd:nth-of-type(odd) {
    background-color: #f0f0f0;
}

dl.client>dt {
    font-weight: bold;
}

pre.horizontal {
    width: auto;
    overflow-x: scroll;
    background-color: #f0f0f0;
    border-radius: 1em;
    border: 0.25em #f0f0f0 solid;
    padding: 1em;
}

div.hero {
    width: auto;
    margin: 1em 0;
    padding: 0.5em;
}

.giant-warning {
    border-radius: 1em;
    border: 0.5em crimson solid;
    animation-iteration-count: infinite;
    animation-name: warning-blink;
    animation-duration: 1s;
}

@keyframes warning-blink {
    /* lol, this is hopefully sufficiently annoying. I was thinking about a black/yellow "caution tape" type look instead, what do you reckon? */
    from {
        border-color: transparent;
    }
    to {
        border-color: crimson;
    }
}