﻿/*! =========================================================================== */
/* Variables and Resets */
/*! =========================================================================== */

:root {
    /* Color */
    --color-brand-1-900: hsl(216, 100%, 50%);
    --color-brand-1-300: hsl(216, 20%, 95%);
    --color-brand-2-700: hsl(224, 4%, 47%);
    --color-brand-2-500: hsl(216, 5%, 80%);
    --color-brand-2-300: hsl(216, 20%, 95%);
    --color-site-1-900: hsl(0, 0%, 100%);
    --color-site-2-900: hsl(221, 23%, 16%);
    --color-site-5-200: rgba(255, 89, 95, 0.2);
    --color-site-5-700: hsl(358, 100%, 67%);
    /* Space */
    --space-s: 10px;
    --space-m: 20px;
    --space-l: 30px;
    /* Font Size */
    --font-size-xs: 10px;
    --font-size-base: 14px;
    --font-size-xl: 24px;
    --font-size-l: 16px;
    /* Font Weight */
    --font-semi-bold: 500;
    --font-bold: 700;
    /* Broder Radius */
    --border-circle: 50%;
    --border-pill: 50px;
    --border-radius-s: 6px;
    --border-radius-m: 10px;
    --border-radius-l: 14px;
    /* Animation Speed */
    --animation-fast: 150ms;
    --animation-m: 200ms;
}

/* Reset */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
input,
button {
    --font-primary: 'inter';
    font-family: var(--font-primary), -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: var(--font-size-base);
}

@supports (font-variation-settings: normal) {
    html,
    input {
        --font-primary: 'Inter var';
    }
}

body {
    height: 100vh;
    height: 100dvh;
}

a,
a:visited {
    color: var(--color-brand-1-900);
}

/*! =========================================================================== */
/* Widget */
/*! =========================================================================== */

/* Widget - Section */

.section {
    border: 1px solid var(--color-brand-2-500);
    border-radius: var(--border-radius-l);
    padding: var(--space-l);
}

/* Widget - Form */

.form-full-page {
    width: min(400px, 100%);
}

@media (max-width: 1025px) {
    .form-full-page {
        border: 0;
    }
}

/* Widget - Input */

.input-wrapper {
    --input-padding: 14px;
    --input-height: 50px;
    position: relative;
}

.input {
    border: 1px solid var(--color-brand-2-500);
    border-radius: var(--border-radius-m);
    font-size: inherit;
    font-weight: var(--font-semi-bold);
    height: var(--input-height);
    outline: transparent;
    padding: var(--input-padding) var(--input-padding) 0 var(--input-padding);
    transition: all var(--animation-fast);
}

    .input.read-only {
        border: 0;
        pointer-events: none;
        background-color: var(--color-brand-2-300);
    }

    .input:focus {
        border-color: var(--color-brand-1-900);
    }

.input-wrapper:has(.input:focus) .field-description path {
    fill: var(--color-brand-1-900);
}

.input::placeholder {
    visibility: hidden;
    color: transparent;
}

.input-label {
    color: var(--color-brand-2-700);
    pointer-events: none;
    position: absolute;
    left: var(--input-padding);
    top: calc((var(--input-height) / 2) - (var(--font-size-base) / 2));
    transition: all var(--animation-fast);
}

.input-wrapper:has( .input:focus, .input:not(:placeholder-shown), .input:-webkit-autofill )
.input-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-bold);
    top: 6px;
    text-transform: uppercase;
}

.input-label[aria-required="true"]::after {
    content: '*';
    color: var(--color-site-5-700);
    margin-left: 2px;
}

.tried-submit .input:invalid,
.input.touched:invalid {
    border-color: var(--color-site-5-700);
}

.tried-submit .input-wrapper:has(.input:invalid) .input-label,
.input-wrapper:has(.input.touched:invalid) .input-label {
    color: var(--color-site-5-700);
}

.input-wrapper .toggle-password {
    position: absolute;
    top: var(--input-padding);
    right: 12px;
}

.validation-massage {
    color: var(--color-site-5-700);
    font-size: var(--font-size-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    margin-left: 2px;
}

/* Widget - Checkbox */

.checkbox {
    appearance: none;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--color-brand-2-500);
    border-radius: 6px;
    height: 18px;
    cursor: pointer;
    transition: background-color, border-color var(--animation-m);
}

    .checkbox:checked {
        background-color: var(--color-brand-1-900);
        border-color: var(--color-brand-1-900);
    }

        .checkbox:checked::before {
            content: url(../assets/icon/checkWhite.svg);
        }

.checklist .list-item .checkbox:focus-visible {
    outline: transparent;
}

.checkbox:disabled {
    cursor: default;
    pointer-events: none;
    background-color: var(--color-brand-1-300);
}

.checkbox:checked:disabled {
    background-color: var(--color-brand-2-500);
    border-color: var(--color-brand-2-500);
}

/* Widget - Button */

.button {
    border: 0;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    justify-content: center;
    padding-inline: 14px;
    transition: opacity var(--animation-fast);
}

    .button.large {
        height: 50px;
    }

    .button.medium {
        height: 34px;
    }

    .button.small {
        height: 28px;
    }

    .button.round {
        aspect-ratio: 1 / 1;
        padding: 0;
    }

    .button.primary {
        background-color: var(--color-brand-1-900);
        color: var(--color-site-1-900);
        font-weight: var(--font-semi-bold);
        outline-color: var(--color-brand-1-900);
    }

    .button.secondary {
        background-color: var(--color-brand-2-300);
    }

    .button:not(:disabled) {
        cursor: pointer;
    }

    .button.loading {
        pointer-events: none;
    }

        .button.loading::before {
            content: '';
            animation: loadingSpinner 850ms cubic-bezier(0.7, 1.05, 0.78, 0.78) infinite;
            border: 2px solid #ffffff;
            border-top: 2px solid transparent;
            display: inline-block;
            height: 12px;
            width: 12px;
            border-radius: 50%;
            margin-right: 5px;
        }

    .button:not(.background-transparent):focus-visible {
        outline-offset: 2px;
    }

/* Widget - alert */

.alert {
    align-items: center;
    border-radius: var(--border-radius-m);
    display: flex;
    gap: var(--space-s);
    height: fit-content;
    min-height: 40px;
    padding: var(--space-s);
}

    .alert.info {
        background-color: var(--color-background-3);
    }

    .alert.success {
        background-color: var(--color-brand-1-300);
    }

    .alert.warning {
        background-color: var(--color-site-12-light);
    }

        .alert.warning path {
            fill: var(--color-site-12);
        }

    .alert.error {
        background-color: var(--color-site-5-200);
        color: var(--color-site-5-700);
    }

        .alert.error path {
            fill: var(--color-site-5-700);
        }

    .alert .validation-summary-errors ul {
        list-style: none;
        font-weight: var(--font-semi-bold)
    }

    .alert.list-style-none ul {
        list-style: none;
    }

    /* Widget - Navigation Group */
    .nav-group {
        --nav-group-background-color: var(--color-brand-2-300);
    }

    .nav-group.vertical,
    .nav-group[transparent] {
        --nav-group-background-color: transparent;
    }

.nav-group {
    background-color: var(--nav-group-background-color);
    border-radius: var(--border-pill);
    font-weight: 600;
}

    .nav-group.horizontal {
        max-width: fit-content;
    }

    .nav-group .nav-item {
        align-items: center;
        color: var(--color-site-2-900);
        gap: var(--space-s);
        display: flex;
        text-decoration: none;
    }

        .nav-group .nav-item.active {
            background-color: var(--color-site-2-900);
            color: #fff;
            font-weight: var(--font-semi-bold);
        }

            .nav-group .nav-item.active path {
                fill: #fff;
            }

    .nav-group.horizontal ul {
        align-items: center;
        display: flex;
    }

    .nav-group.horizontal .nav-item {
        border-radius: var(--border-pill);
        padding-inline: 16px;
        height: 34px;
    }

    .nav-group.vertical .nav-item {
        border-radius: var(--border-radius-s);
        height: 40px;
        padding-inline: var(--space-s);
    }

    /*! =========================================================================== */
    /* Utility */
    /*! =========================================================================== */
    /* Utility - Background */
    .background-transparent {
        background-color: transparent;
    }

/* Utility - Height */

.full-height {
    height: 100%;
}

/* Utility - Width */

.full-width {
    width: 100%;
}

/* Utility - Flex */

.display-flex {
    display: flex;
}

.display-grid {
    display: grid;
}

/* Utility - List */

.list-style-none {
    list-style: none;
}

/* Utility - Align */

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.text-align-center {
    text-align: center;
}

.text-align-left {
    text-align: left;
}

/* Utility - Position */

.position-absolute {
    position: absolute;
}

/* Utility - Margin */

.margin-top-2 {
    margin-top: 2px;
}

.margin-top-s {
    margin-top: var(--space-s);
}

.margin-top-m {
    margin-top: var(--space-m);
}

.margin-top-l {
    margin-top: var(--space-l);
}

.margin-bottom-l {
    margin-bottom: var(--space-l);
}

.margin-left-s {
    margin-left: var(--space-s);
}

/* Utility - Padding */

.padding-l {
    padding: var(--space-l)
}

/* Utility - Font */

/* Utility - Font - Size */

.font-size-xl {
    font-size: var(--font-size-xl);
}

.font-size-l {
    font-size: var(--font-size-l);
}

/* Utility - Font - Weight */

.font-semi-bold {
    font-weight: var(--font-semi-bold);
}

/* Utility - Text */

.text-decoration-none {
    text-decoration: none;
}

/*! =========================================================================== */
/* Animation */
/*! =========================================================================== */

/* Spinner */

.loading-spinner {
    animation: loadingSpinner 850ms cubic-bezier(0.7, 1.05, 0.78, 0.78) infinite;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    display: inline-block;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    margin-right: 5px;
}

@keyframes loadingSpinner {
    0% {
        transform: rotate(0deg) translateZ(0);
    }

    100% {
        transform: rotate(360deg) translateZ(0);
    }
}