
/* ==================================
  BASICS
================================== */

:root {
    /* Brand colors */
    --color-green-100: #004C66;
    --color-green-80: #2F99AE;
    --color-green-60: #65CBD7;
    --color-green-30: #ACE4F0;
    --color-green-15: #DAF8FD;
    --color-green-5: #EDF8FB;

    /*--color-green-100: #005B4A;
    --color-green-80: #2F8978;
    --color-green-60: #65C2B1;
    --color-green-30: #ACE6DB;
    --color-green-15: #D4F8F1;
    --color-green-5: #EDFCF9;*/

    --color-focus: #042A2B;
    --color-errors: #FF0800;
    --color-errors-ele: rgba(255,8,0,0.05);

    /* Fonts */
    --font-sans: "Open Sans",'Helvetica Neue',Helvetica,Arial,sans-serif;
    --font-display: "Lexend Deca",sans-serif;

    /* Page configuration */
    --width-page-max: 1200px;
    --spacing-page-padding: 1.5rem;

    /* Breakpoints */
    --breakpoint-page: 1200px;
    --breakpoint-tablet: 890px;
    --breakpoint-mobile: 520px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
    vertical-align: baseline;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    list-style: none;
    outline: 0;
}

html {
    background-color: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font: 400 1em/100% var(--font-sans);
    font-optical-sizing: auto;
    color: black;
}
html, body {
    min-height: 100vh;
}
body {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.transitions,
a, button, svg, svg path, img,
input, select, textarea,
.content_center, .page_header,
.button_primary, .button_secondary {
    transition: all 0.3s ease-out;
}

a {
    color: var(--color-green-100);
    text-decoration: underline;
}
a:hover {
    color: var(--color-green-80);
    text-decoration: none;
}
a:active {
    color: var(--color-green-60);
    text-decoration: none;
}

strong {
    font-weight: 700;
}

button, a {
    cursor: pointer;
}

.button_primary {
    background-color: var(--color-green-80);
    color: white;

    &:hover {
        border-color: var(--color-green-60);
        background-color: var(--color-green-60);
    }

    &:disabled, &:active:disabled {
        border-color: #EEE;
        background: #EEE url('../images/loading-buttons.gif') center no-repeat;
        background-size: 25px 25px;
        cursor: not-allowed;
        transform: unset;
        filter: unset;
        transition: unset;
        color: transparent;
        text-align: center;
    }
}
.button_secondary {
    background-color: transparent;
    color: var(--color-green-80);

    &:hover {
        border-color: var(--color-green-60);
        background-color: var(--color-green-60);
        color: white;
    }
}
.button_primary,
.button_secondary {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border: solid 3px var(--color-green-80);
    border-radius: 2rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 0.9;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;

    &:active {
        border-color: var(--color-green-80);
        background-color: var(--color-green-30);
        color: var(--color-green-100);
    }
}

.button_round_icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    background-color: var(--color-green-60);
    border-radius: 100%;

    svg {
        display: block;
        width: 50%;
        height: 50%;
    }
    path {
        fill: white;
    }

    &:active {
        background-color: var(--color-green-80);
        transform: scale(1.2);
    }
}

.focus:focus {
    outline: dashed 2px var(--color-focus);
    outline-offset: 2px;
}
.focus-link:focus {
    outline: dashed 2px var(--color-focus);
    outline-offset: 2px;
    border-radius: 0.3rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.content_center {
    margin: 0 auto;
    max-width: var(--width-page-max);
    min-width: 280px;
}
@media (max-width: 1200px) {
    .content_center {
        padding: 0 var(--spacing-page-padding);
        min-width: 260px;
    }
}

.no-wrap {
    display: inline-block;
    white-space: nowrap;
}

.page_main {
    padding: 3rem 0 5rem;
    transition: all 0.8s ease-out;
    opacity: 1;

    &.hidden_content {
        opacity: 0;
    }
}

/* ==================================
  LANDING BASICS
================================== */

.page_header,
.page_header-content {
    height: 80px;
}
.page_header {
    flex-shrink: 0;
    background-color: var(--color-green-30);
    z-index: 99;
}
.page_header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
.page_header-logo {
    display: block;
    width: 280px;

    &:focus {
        outline: dashed 2px var(--color-focus);
        outline-offset: 6px;
        border-radius: 0.3rem;
    }

    img, svg {
        width: 100%;
        height: auto;
    }
}

.page_header-nav,
.page_header-nav-columns {
    width: 100%;
}
.page_header-nav {
    position: sticky;
    top: 0;
    left: 0;
    display: block;
    background-color: var(--color-green-80);
    z-index: 100;

    .link {
        display: inline-block;
        padding: 0.2rem 0.5rem;
        background-color: transparent;
        border-radius: 2rem;
        font-family: var(--font-sans);
        font-size: 0.7rem;
        line-height: 1;
        color: white;
        text-decoration: none;
        text-transform: uppercase;
        font-weight: 600;

        &:hover {
            background-color: var(--color-green-30);
            color: black;
        }
        &:active, &.active {
            background-color: white;
            color: black;
        }
        &:focus {
            text-decoration: underline;
        }
    }
}
.page_header-nav-columns,
.page_header-nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.page_header-nav-columns {
    justify-content: space-between;
    & > span {
        display: inline-block;
    }
}
.page_header-nav-links {
    padding: 0.3rem 0;
    gap: 0.2rem;
}

.page_title {
    display: inline-block;
    padding: 0.5rem 0.8rem;
    background-color: var(--color-green-15);
    border-radius: 2rem;
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1;
    color: var(--color-green-80);
    letter-spacing: -1px;
    text-transform: uppercase;
}

.skip-link {
    position: absolute;
    top: -50px;
    left: 10px;
    background-color: black;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    z-index: 1000;
    transition: top 0.3s ease;
    font-size: 14px;

    &:focus {
        top: 10px;
        outline: dashed 1px black !important;
        outline-offset: 4px;
    }
    &:hover {
        color: white;
        background-color: #444;
    }
}

/* ==================================
  Login
================================== */

.page_login-content {
    .login_box {
        width: 360px;
        max-width: 100%;
        margin: 0 auto;
    }
    .login_button {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }
}

/* ==================================
  Survey
================================== */

.page_survey-content {
    .app_forms {
        .fieldset, .row {
            margin-bottom: 2rem;
        }
        .row {
            position: relative;
        }
        .textarea {
            height: auto;
        }
        .input:disabled {
            color: black;
            font-weight: 600;
        }
        .label {
            color: #555;
        }
        .inpradios {
            display: block;
            border: 0;
            overflow: unset;
            margin-bottom: 2rem;

            &:last-child {
                margin-bottom: 0;
            }

            .label {
                position: unset;
                display: block;
                line-height: 1.4;
                color: black;
                font-weight: 600;
            }
            .radios {
                width: 100%;
                margin-top: 0.5rem;
                gap: 0.5rem 1.2rem;
                flex-wrap: wrap;

                &, label, input[type="radio"] {
                    display: flex;
                    flex-direction: row;
                }
                label, input[type="radio"] {
                    cursor: pointer;
                }
                label {
                    gap: 5px;
                    align-items: center;
                    flex-wrap: nowrap;
                    color: #888;
                    font-weight: 500;
                }
                label, label span, input[type="radio"],
                input[type="radio"]::before {
                    transition: all 0.3s ease-out;
                }
                input[type="radio"] {
                    justify-content: center;
                    align-items: center;
                    appearance: none;
                    width: 25px;
                    height: 25px;
                    border: solid 2px var(--color-green-30);

                    &, &::before {
                        flex-shrink: 0;
                        border-radius: 3rem;
                    }

                    &::before {
                        display: inline-block;
                        width: 0;
                        height: 0;
                        background-color: white;
                        content: '';
                    }

                    &:checked {
                        border-color: var(--color-green-80);
                        &::before {
                            width: 60%;
                            height: 60%;
                            background-color: var(--color-green-80);
                        }
                    }
                    &:checked ~ span {
                        color: black;
                    }
                    
                    &:focus {
                        outline: dashed 2px var(--color-focus);
                        outline-offset: 2px;
                    }
                }
            }
        }
    }
    .button_round_icon {
        position: absolute;
        right: 5px;
        top: 5px;
        width: 41px;
        height: 41px;
    }

    @media (max-width: 760px) {
        .app_forms {
            .row.columns {
                flex-direction: column;
            }
            .inpradios {
                .label {
                    margin-bottom: 0.9rem;
                }
                .radios {
                    flex-direction: column;
                    gap: 0.8rem 1.2rem;
                }
            }
        }
    }
    @media (max-width: 420px) {
        .app_forms {
            .send_button {
                padding-left: 0;
                padding-right: 0;
                width: 100%;
            }
        }
    }
}

/* ==================================
  Respondents Answers
================================== */

.page_respondents-content {
    display: block;
    width: 100%;
}

.block {
    display: block;
    padding: var(--spacing-page-padding);
    margin-bottom: 2rem;
    background-color: var(--color-green-5);
    border-radius: 1rem;

    &:last-child {
        margin-bottom: 0;
    }
}
.block_title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 2rem;
    width: 100%;

    h2 {
        display: inline-block;
        font-family: var(--font-display);
        font-size: 1.6rem;
        line-height: 1.2;
        color: var(--color-green-80);
        font-weight: 700;
    }
}
@media (max-width: 520px) {
    .block_title {
        h2 {
            font-size: 1.3rem;
        }
    }
}

.block_columns {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 1.8rem 1.5rem;

    &, .column {
        width: 100%;
    }
    h3 {
        padding: 0 0.3rem 0.6rem;
        font-family: var(--font-sans);
        font-size: 0.9rem;
        line-height: 1.1;
        color: black;
        font-weight: 700;
    }
    p {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.5rem 0.3rem;
        border-bottom: solid 1px var(--color-green-30);
        transition: all 0.3s ease-out;
        font-size: 0.8rem;
        line-height: 1.1;
        color: black;

        &:first-of-type {
            border-top: solid 1px var(--color-green-30);
        }

        &:hover, &:active {
            background-color: white;
        }
    }
    span {
        display: inline-block;
        &:last-child {
            font-weight: 600;
        }
    }
}
@media (max-width: 820px) {
    .block_columns {
        flex-direction: column;
    }
}

.block_table-scroller {
    display: block;
    width: 100%;
    overflow-x: auto;
}
.block_table {
    border-collapse: collapse;
    width: 100%;
    min-width: 760px;

    tr {
        border-bottom: solid 1px var(--color-green-30);
        transition: all 0.3s ease-out;
    }
    th, td {
        width: auto;
        vertical-align: middle;
        font-family: var(--font-sans);
        color: black;
        text-align: left;

        &.center {
            text-align: center;
            img, svg {
                margin: 0 auto;
            }
        }
    }
    th {
        padding: 0 0.3rem 0.6rem;
        font-size: 0.9rem;
        line-height: 1.1;
        font-weight: 700;
    }
    td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
        line-height: 1.1;
        font-weight: 400;
    }
    tbody {
        tr:hover, tr:active {
            background-color: white;
        }
    }
}
@media (max-width: 960px) {
    .block_table-scroller {
        border: solid 2px var(--color-green-30);
        border-radius: 0.5rem;
    }
    .block_table {
        th {
            padding: 0.7rem 0.2rem 0.6rem;
            background-color: var(--color-green-5);
        }
        tbody {
            tr:first-child {
                border-top: solid 2px var(--color-green-30);
            }
            tr:last-child {
                border-bottom: 0;
            }
            tr:nth-child(odd) {
                background-color: rgba(255,255,255,0.5);
            }
            tr:hover, tr:active {
                background-color: white;
            }
        }
    }
}
