﻿:root {
    /* VARIABLES FOR COLOUR*/
    --colour-brand-primary: #E0E500; /* Yellow from the logo*/
    --colour-brand-secondary: #FFFFFF; /* White from the logo and headings */
    --colour-text-primary: #242424; /* Dark grey text for popup messages, exercise panels etc */
    --colour-text-secondary: #D0D0D0; /* Light grey text for control labels etc*/
    --colour-text-disabled: #454444; /* Dark grey text for disabled controls */
    --colour-text-error: #FF073A; /* Red color for error text */
    --colour-border-primary: #E0E500; /* Yellow border for videos, user avatar etc */
    --colour-border-secondary: #D0D0D0; /* Grey border for input controls, button hover */
    --colour-border-panel: rgba(208, 208, 208, 0.2); /* Muted grey border */
    --colour-border-video-resolvable: #FF073A; /* Red background for when the delay video is resolvable */
    --colour-bg-primary: #2C2C2C; /* Darkest grey background for the main content area */
    --colour-bg-modal: rgba(0, 0, 0, 0.7); /* Black background with transparency for modals */
    --colour-bg-panel-primary: #1B1B1B; /* Darker grey background for panels */
    --colour-bg-panel-secondary: #242424; /* Dark grey background for alternate panels */
    --colour-bg-panel-tertiary: #333333; /* Lighter grey background for alternate panels */
    --colour-bg-panel-input: #D0D0D0; /* Medium grey background for input panels */
    --colour-bg-control-primary: #E0E500; /* Yellow background for buttons, checkboxes, toggle sliders etc */
    --colour-bg-control-secondary: #454444; /* Medium grey background for timeline, buttons, toggle buttons etc */
    --colour-bg-control-secondary-disabled: #2C2C2C; /* Dark grey background for disabled controls */
    --colour-bg-control-secondary-selected: #D0D0D0; /* Light grey background for selected buttons */
    --colour-bg-control-dark: #000000; /* Black background for dark mode controls */
    --colour-bg-control-light: #FFFFFF; /* Black background for dark mode controls */
    --colour-bg-input: rgba(66, 66,66, 0.2); /* Darker grey background for panels */
    --colour-bg-control-shadow: #000000; /* Black shadow for controls, e.g. to make keyboard keys skeuomorphic */
    --colour-bg-popup: #FFFFFF; /* White background for popups */
    --colour-bg-timeline-icon: #FF073A; /* Red background for timeline icons */
    --colour-bg-timeline-hitzone: rgba(255, 7, 58, 0.3); /* Red background with transparency for timeline hitzones */
    --colour-bg-table-header: #333333; /* Dark grey background for table headers */
    --colour-bg-table-footer: #333333; /* Medium grey background for table headers */
    --colour-bg-table-cell: #4E4C4C; /* Medium grey background for table cells */
    --colour-bg-hr: #868683; /* Dark grey background for horizontal rules */
    --colour-bg-status-success: rgba(224, 229, 0, 0.1); /* Subtle yellow background for success */
    --colour-bg-status-error: rgba(255, 7, 58, 0.1); /* Subtle red background for errors */
    /* VARIABLES FOR MARGIN, PADDING, RADIUS ETC */
    --padding-default: 20px;
    --margin-default: 20px;
    --border-radius-default: 10px;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

html, body {
    max-width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrollbars */
    font-family: 'Satoshi-Regular';
    user-select: none;
}

body {
    background: var(--colour-bg-primary);    
}

    body.splash {
        background-image: url('../img/SplashScreenBG.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: var(--padding-default);
        min-height: 100vh; /* Ensure the body takes up the full viewport height */
    }    

.splash-container {    
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
    padding: 0;
}

a {
    color: var(--colour-text-secondary);
    text-decoration: underline;
}

    a:hover {
        color: var(--colour-brand-primary);
    }

input[type="checkbox"] {
    appearance: none;
    width: 30px;
    height: 30px;
    background-color: var(--colour-bg-input);
    border: 1px solid var(--colour-border-secondary);
    border-radius: calc(var(--border-radius-default) / 2);
    cursor: pointer;
    vertical-align: middle;
    margin-right: var(--margin-default);
    position: relative;
}

    input[type="checkbox"].chk-medium {
        width: 20px;
        height: 20px;
    }

    input[type="checkbox"]:not(:checked):hover {
        border: 1px solid var(--colour-brand-primary);
    }

    input[type="checkbox"]:checked {
        background-color: var(--colour-brand-primary);
    }

    input[type="checkbox"]:checked::after {
        content: '✓';
        color: var(--colour-text-primary);
        font-size: 24px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

        input[type="checkbox"].chk-medium:checked::after {
            font-size: 16px;
        }

/* Custom radio button styling to match checkboxes */
input[type="radio"] {
    appearance: none;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    background-color: var(--colour-bg-input);
    border: 1px solid var(--colour-border-secondary);
    border-radius: 50%;
    cursor: pointer;
    vertical-align: middle;
    margin-right: var(--margin-default);
    position: relative;
}

    input[type="radio"].radio-medium {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }

    input[type="radio"]:not(:checked):hover {
        border: 1px solid var(--colour-brand-primary);
    }

    input[type="radio"]:checked {
        background-color: var(--colour-brand-primary);
    }

        input[type="radio"]:checked::after {
            content: '';
            width: 15px;
            height: 15px;
            min-width: 15px;
            min-height: 15px;
            background-color: var(--colour-text-primary);
            border-radius: 50%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

    input[type="radio"].radio-medium:checked::after {
        width: 10px;
        height: 10px;
        min-width: 10px;
        min-height: 10px;
    }

.splash-header-logo {
    position: absolute;
    top: calc(var(--margin-default) * 1);
    left: calc(var(--margin-default) * 1);
}

.screen-centered-panel {
    text-align: center;
    padding: var(--padding-default);
    align-items: center;
    max-width: 100%; /* Ensure the panel does not exceed the viewport width */
}

    .screen-centered-panel img {
        max-width: 100%;
        height: auto; /* Ensure the image scales proportionally */
    }

.brand-text {
    color: var(--colour-brand-primary);
}

.tagline {
    font-family: 'ClashDisplay-Medium';
    font-variant-caps:all-small-caps;
    letter-spacing:0.27rem;
    color: var(--colour-brand-primary);
    font-size: 3.4rem;    
    margin-bottom: 100px;
}

.button-primary, .btn {
    display: inline-block;
    border-radius: var(--border-radius-default);
    padding: calc(var(--padding-default) / 2) calc(var(--padding-default) * 3);
    text-decoration: none;
    font-family: 'Satoshi-Light';
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
}

.button-primary, .btn-primary {
    background: var(--colour-bg-control-primary);
    color: var(--colour-text-primary);
}

    .button-primary:hover {
        background: var(--colour-text-primary);
        color: var(--colour-bg-control-primary);
        outline: 1px solid var(--colour-border-secondary);
    }

.full-width {
    width: 100%;
}

.hidden {
    display: none!important;
}

.fade-out-1 {
    transition: opacity 0.5s ease-out;
    opacity: 0;
}

.fade-in-1 {
    opacity: 0;
    transition: opacity 1s ease-in;
}

    .fade-in-1.show {
        opacity: 1;
    }

.modal-panel {
    background-color: var(--colour-bg-modal);
    padding: var(--padding-default) calc(var(--padding-default) * 2);
    position: relative;
}

    .modal-panel p, .modal-panel label {
        color: var(--colour-text-secondary);
    }

.form-floating > label {
    color: var(--colour-text-primary);
}

.close-modal-button {
    position: absolute;
    top: calc(var(--padding-default) / 2);
    right: calc(var(--padding-default) / 2);
    cursor: pointer;
    z-index: 10;
    fill: var(--colour-bg-control-light); /* Move fill from SVG to CSS */
    transition: fill 0.2s;
}

    .close-modal-button:hover {
        fill: var(--colour-brand-primary);
    }

.secondary-panel {
    background-color: var(--colour-bg-panel-secondary);
    padding: calc(var(--padding-default) / 2);
}

.header, .sub-header {
    text-align: center;
    font-family: 'ClashDisplay-Regular';    
    color: var(--colour-brand-secondary);    
}

.header {
    letter-spacing: 0.1rem;
    font-size: 1.8rem;
    text-align: left;
}

.sub-header {
    letter-spacing: 0.15rem;
    font-size: 1.4rem;
}

.form-modal {
    position: relative;
    border-radius: var(--border-radius-default);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--margin-default);
    padding: calc(var(--padding-default) * 2) calc(var(--padding-default) * 4);
}

    .form-modal .identity-input-control {
        text-align: center;
        border-radius: var(--border-radius-default);
        border: 1px solid var(--colour-border-secondary);
        padding: var(--padding-default);
        background-color: var(--colour-bg-input);
        color: var(--colour-text-secondary);
        width: 100%;
        font-size: 1.4rem !important;
    }

    .form-modal select.identity-input-control {
        color: var(--colour-text-secondary);
    }

    .form-modal select.identity-input-control option {
        color: var(--colour-text-primary);
    }

        .form-modal select.identity-input-control option:hover {
            background-color: var(--colour-brand-primary);
        }

.back-arrow {
    position: absolute;
    top: 50%; /* vertical centring */
    left: var(--margin-default); /* keep it snug to the modal’s normal margin */
    transform: translateY(-50%);
    font-size: 2.4rem; /* scales with root font size */
    line-height: 1;
    color: var(--colour-brand-secondary);
    text-decoration: none;
    cursor: pointer;
}

    .back-arrow::before { /* open, un-filled “<” shape */
        content: "";
        display: inline-block;
        width: 14px; /* overall size – tweak as desired */
        height: 14px;
        border-left: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg); /* turns the ⬋ into a left-pointing chevron */
    }

    .back-arrow:hover,
    .back-arrow:focus {
        color: var(--colour-brand-primary); /* brand yellow on hover/focus */
        outline: none;
    }

.login-header {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center; /* Default to center */
    align-items: center;
    margin-bottom: var(--margin-default);
    column-gap: calc(var(--margin-default) * 3);
}

    /* Apply space-between if there is more than one child */
    .login-header:has(> *:nth-child(2)) {
        justify-content: space-between;
    }

.identity-controls {
    width:100%;
    display: flex;
    flex-direction: column;
    row-gap: calc(var(--margin-default) / 2);    
}

.login-remember-me {
    display: flex;
    flex-direction: row;   
    align-items:center;
    width: 100%;
    text-align: start;
    color: var(--colour-text-secondary);
    font-size: 1.2rem;
}

.login-accessibility {
    cursor: pointer;
    display: flex;
    flex-direction: row;
    column-gap: var(--margin-default);
    width: 100%;
    border-radius: var(--border-radius-default);
    padding: calc(var(--padding-default) / 2) var(--padding-default);
    align-content: center;
    text-align: start;
    color: var(--colour-text-secondary);
    font-size: 1.2rem;
}

    .login-accessibility:hover {
        background-color: var(--colour-bg-control-secondary);
    }

.login-links {
    display: flex;
    flex-direction: row;
    gap: calc(var(--padding-default) * 2);
}

.error-control {
    border: 1px solid var(--colour-text-error);
    background: #ffeeee;
}

.error-message {
    color: var(--colour-text-error);
    font-size: 1.2rem;
    text-align: center;
}

    .error-message.validation-summary-valid ul:empty {
        display: none;
    }

    .error-message.validation-summary-valid {
        display: none;
    }

.validation-summary-errors ul {
    list-style: none;
    margin: calc(var(--margin-default) / 2) 0;
    padding: 0;
}

.demo-choices {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
    gap: var(--margin-default);
}

.status-message-panel {
    position: relative;
    padding: var(--padding-default);
    border-radius: var(--border-radius-default);
    font-size: 1.4rem;
    text-align: center;
    color: var(--colour-text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
}

    .status-message-panel.status-success {
        background-color: var(--colour-bg-status-success); /* Subtle yellow background for success */
        color: var(--colour-brand-primary);
    }

    .status-message-panel.status-error {
        background-color: var(--colour-bg-status-error); /* Subtle red background for errors */
        color: var(--colour-text-error);
    }

    .status-message-panel .status-message-text {
        flex: 1;
        padding: 0 10px;
    }

    .status-message-panel .btn-close {
        position: absolute;
        top: 50%;
        right: 15px;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: inherit;
        font-size: 2rem;
        cursor: pointer;
        line-height: 1;
    }

        .status-message-panel .btn-close:hover {
            outline: 1px solid var(--colour-brand-primary);
        }

input.identity-input-control:-webkit-autofill,
input.identity-input-control:-webkit-autofill:hover,
input.identity-input-control:-webkit-autofill:focus,
input.identity-input-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px var(--colour-bg-input) inset !important;
    box-shadow: 0 0 0px 1000px var(--colour-bg-input) inset !important;
    -webkit-text-fill-color: var(--colour-text-secondary) !important;
    font-family: 'Satoshi-Regular' !important; /* Ensure consistent font family */
    font-size: 1.4rem !important;
    transition: background-color 5000s ease-in-out 0s;
}

.user-menu {
    background: var(--colour-bg-modal);
    padding: calc(var(--padding-default) / 1.5) calc(var(--padding-default) * 1);
    border-radius: var(--border-radius-default);
    position: fixed;
    top: calc(var(--margin-default) * 1);
    right: calc(var(--margin-default) * 1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: calc(var(--margin-default) * 1);
    z-index: 1000;
}

.language-button,
.logout-button,
.login-button,
.settings-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

    .language-button img,
    .logout-button img,
    .login-button img,
    .settings-button img {
        height: 25px;
        border-radius: 3px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        transition: transform 0.2s ease;
    }

        .language-button img:hover,
        .logout-button img:hover,
        .login-button img:hover,
        .settings-button img:hover {
            transform: scale(1.1);
        }

.language-button {
    display: flex;
    flex-direction: row;
    align-items: center;
}

    .language-button img
    {
        margin-right: calc(var(--margin-default) / 4);
    }

    .language-button span {
        color: var(--colour-text-secondary);
    }

.company-logo-small {
    display: block;
}

.company-logo-small-r-only {
    display: none;
}

/* Media queries for responsive design */
@media (max-width: 1440px) {
    .company-logo-small {
        display: none;
    }

    .company-logo-small-r-only {
        display: block;
    }
}

@media (max-width: 1200px) {
    .tagline {
        font-size: 3rem;
        margin-bottom: 80px;
    }
}

@media (max-width: 992px) {
    .tagline {
        font-size: 2.5rem;
        margin-bottom: 60px;
    }
}

@media (max-width: 768px) {
    .tagline {
        font-size: 2em;
        margin-bottom: 40px;
    }

    .button-primary {
        font-size: 1.5rem;
        padding: calc(var(--padding-default) / 2) var(--padding-default);
    }
}

@media (max-width: 576px) {
    .tagline {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .button-primary {
        font-size: 1.2rem;
        padding: calc(var(--padding-default) / 2) calc(var(--padding-default) * 1.5);
    }

    .form-modal {
        min-width: 380px;
        padding: calc(var(--padding-default) * 2) calc(var(--padding-default) * 2);
    }

        .form-modal .identity-input-control {
            padding: calc(var(--padding-default) / 2);
            font-size: 1.1rem;
        }
}