/* Fonts Family */
@font-face {
    font-family: "Inconsolata", sans-serif;
    src: url("/assets/fonts/Inconsolata-VariableFont_wdth\,wght.ttf") format("ttf");
    font-weight: 100 900;
    font-style: normal;
}

:root {
    /*Colors*/
    --Neutral0: hsl(0, 0%, 100%);
    --Neutral300: hsl(252, 6%, 83%);
    --Neutral500: hsl(245, 15%, 58%);
    --Neutral700: hsl(245, 19%, 35%);
    --Neutral900: hsl(248, 70%, 10%);
    --Orange500: hsl(7, 88%, 67%);
    --Orange700: hsl(7, 71%, 60%);
    --Gradient-text: linear-gradient(90deg, hsl(7, 86%, 67%), hsl(0, 0%, 100%));

    /* Font sizes for mobile */
    --h1-mobile: 1.8rem;
    --h2-mobile: 1.5rem;
    --h3-mobile: 1.2rem;
    --h4-mobile: 0.9rem;
    --p-mobile: 0.6rem;

    /* Font sizes for desktop */
    --h1-desktop: 2.7rem;
    --h2-desktop: 1.1rem;
    --h3-desktop: 1rem;
    --h4-desktop: 0.9rem;
    --p-desktop: 0.8rem;
}

/* Reset Element */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url("../assets/images/background-mobile.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    font-family: "Inconsolata", sans-serif;
    font-size: 16px;
    padding: 1.5rem;
    color: var(--Neutral0);
    position: relative;
    min-height: 100vh;
}

body::after {
    content: "";
    position: absolute;
    z-index: -999;
    top: 0;
    right: 0;
    background: url("../assets/images/pattern-squiggly-line-top.svg") top right no-repeat;
    background-size: contain;
    width: 100px;
    height: 100px;
}

body::before {
    content: "";
    position: absolute;
    z-index: -999;
    bottom: 0;
    left: 0;
    background: url("../assets/images/pattern-squiggly-line-bottom-mobile-tablet.svg") bottom left no-repeat;
    background-size: contain;
    width: 200px;
    height: 200px;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
small,
button,
input {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    text-decoration: none;
    color: inherit;
}

label {
    display: block;
    font-size: var(--h4-mobile);
    color: var(--Neutral300);
    margin-bottom: 0.5rem;
}

input {
    border: 1px solid var(--Neutral500);
    padding: 1rem;
    font-size: var(--h4-mobile);
    border-radius: 10px;
    background-color: hsl(from var(--Neutral700) h s l / 0.2);
    width: 100%;
    margin-bottom: 0.5rem;
}

input:focus {
    outline: thin solid var(--Neutral0);
    outline-offset: 3px;
}

/* For form */
.site-logo {
    margin: 0 auto 3rem;
    display: block;
}

.ticket-form {
    display: block;
}

.form-title {
    margin-bottom: 1rem;
    text-align: center;
    font-size: var(--h1-mobile);
    font-weight: bold;
}

.form-subtitle {
    text-align: center;
    font-size: var(--h3-mobile);
    color: var(--Neutral500);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.avatar-upload-area {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border: 2px dashed var(--Neutral500);
    border-spacing: 20px;
    border-radius: 15px;
    padding-block: 1.5rem;
    margin-block: 0.8rem;
    cursor: pointer;
    background-color: hsl(from var(--Neutral700) h s l / 0.2);
}

.upload-image {
    border: 1px solid var(--Neutral700);
    margin-bottom: 1rem;
    background-color: hsl(from var(--Neutral700) h s l / 0.6);
    border-radius: 10px;
    height: 50px;
    width: 50px;
    padding: 0.5rem;
    object-fit: cover;
}

.upload-actions {
    width: 100%;
    height: 100%;
    text-align: center;
}

.upload-actions > button {
    background-color: hsl(from var(--Neutral700) h s l / 0.4);
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    margin-inline: 0.5rem;
    font-size: var(--p-mobile);
}

#btnRemove {
    text-decoration: underline;
}

.upload-instructions {
    font-size: var(--h4-mobile);
}

.error-notice {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.error-notice svg {
    width: 15px;
}

svg path {
    stroke: var(--Neutral500);
}

.notice-text,
.info-text {
    color: var(--Neutral500);
    font-size: var(--p-mobile);
}

.input-field {
    margin-bottom: 1rem;
}

#generate {
    width: 100%;
    background-color: var(--Orange500);
    color: var(--Neutral900);
    font-weight: bold;
    font-size: var(--h4-mobile);
    padding-block: 1rem;
    border-radius: 10px;
    cursor: pointer;
}

#generate:hover {
    background-color: var(--Orange700);
}

#generate:active {
    background-color: var(--Orange500);
}

.result-container {
    display: block;
}

.result-title {
    font-size: var(--h1-mobile);
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
}

#firstName,
#lastName {
    background-image: var(--Gradient-text);
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.result-description {
    text-align: center;
    margin: 1rem 0 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

#result-email {
    color: var(--Orange500);
}

/* For ticket */
.ticket-card {
    position: relative;
    width: 330px;
    height: 200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: safe;
    padding: 0 1rem;
}

.ticket-bg-pattern {
    position: absolute;
    width: inherit;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.ticket-event-date {
    font-size: 0.9rem;
    color: var(--Neutral500);
    margin: 0.3rem 0 0 3rem;
}

.ticket-body {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#userAvatar {
    border-radius: 10px;
}

.user-fullname {
    font-size: 1.1rem;
}

.user-github-handle {
    display: flex;
    align-items: center;
    margin-top: 0.3rem;
}

.user-github-handle img {
    width: 1rem;
    height: 1rem;
}

.github-username {
    font-size: 0.9rem;
    color: var(--Neutral500);
    margin-left: 5px;
}

.ticket-number {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 60px;
    display: flex;
    align-items: center;
}

#number {
    transform: translateX(0) rotate(270deg);
    font-size: 1.2rem;
    color: var(--Neutral500);
}

/* ---------------------------------------- */

/* For desktop */
@media (min-width: 720px) {
    body {
        background-image: url("../assets/images/background-desktop.png");
    }

    body::after {
        width: 30%;
        height: 30%;
    }

    body::before {
        width: 50%;
        height: 40%;
        background-image: url("../assets/images/pattern-squiggly-line-bottom-desktop.svg");
    }

    .ticket-form {
        margin-inline: auto;
    }

    .form-title,
    .form-subtitle {
        width: 50%;
        margin-inline: auto;
    }

    .form-title {
        font-size: var(--h1-desktop);
    }

    .form-subtitle {
        font-size: var(--h2-desktop);
    }

    .form-group,
    .form-submit-wrapper {
        width: 50%;
        margin-inline: auto;
    }

    .error-notice {
        gap: 1rem;
    }

    .error-notice svg {
        scale: 1.2;
    }

    .notice-text {
        font-size: var(--p-desktop);
    }
}

/* ---------------------------------------- */

/* Focus State */
.focus {
    outline: thin solid var(--Neutral0);
    outline-offset: 3px;
}

.hidden {
    display: none;
}

/* Error State */
.error-text {
    color: var(--Orange500);
}

.error-icon {
    stroke: var(--Orange500);
}

/* Error when input is invalid */
.error-input {
    border-color: var(--Orange500);
}

.input-field .error-notice .notice-text {
    color: var(--Orange500);
}

.input-field .error-notice svg path {
    stroke: var(--Orange500);
}

/* Footer */
.footer-attribution {
    margin-top: 2rem;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
}

.provider,
.coder {
    color: var(--Orange700);
}
