:root {

    --font-family: "Inconsolata", monospace;

    --white: hsl(0, 0%, 100%);
    --gray-light: hsl(252, 6%, 83%);
    --gray: hsl(245, 15%, 58%);
    --gray-dark: hsl(245, 19%, 35%);
    --black: hsl(248, 70%, 10%);
    --input: hsl(245deg 19% 35% / 30%);
    --upload-icon: hsl(245deg 19% 35% / 57%);

    --orange: hsl(7, 88%, 67%);
    --orange-dark: hsl(7, 71%, 60%);

    --gradient-primary: linear-gradient(to right, hsl(7, 86%, 67%), var(--white));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-image: url(./assets/images/background-mobile.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
}

.background-pattern {
    background-image: url(./assets/images/pattern-lines.svg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.background-circle {
    background-image: url(./assets/images/pattern-circle.svg);
    background-repeat: no-repeat;
    background-size: 35%;
    position: absolute;
    top: -35px;
    left: -30px;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.background-circle-2 {
    background-image: url(./assets/images/pattern-circle.svg);
    background-repeat: no-repeat;
    background-size: 35%;
    background-position: 75vw 50vh;
    position: absolute;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.background-line-top {
    background-image: url(./assets/images/pattern-squiggly-line-top.svg);
    background-repeat: no-repeat;
    background-position: 66vw 20px;
    background-size: 34%;
    position: absolute;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.background-line-bottom {
    background-image: url(./assets/images/pattern-squiggly-line-bottom-mobile-tablet.svg);
    background-repeat: no-repeat;
    background-size: 80%;
    background-position: left bottom;
    position: absolute;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

main {
    z-index: 999;
    position: relative;
}

.logo {
    background-image: url(./assets/images/logo-full.svg);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    width: 170px;
    height: 20px;
}

.titles {
    text-align: center;
    padding: 30px;
    gap: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-wrap: balance;
}

.titles h1 {
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.titles h2 {
    color: var(--gray-light);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-left: 30px;
    padding-right: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    color: var(--white);
    width: 100%;
}

.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--input);
    padding: 20px;
    border-radius: 10px;
    border: 0.5px dashed var(--gray);
    width: 100%;
    cursor: pointer;
}

.avatar-container p {
    color: var(--gray-light);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.upload-icon {
    background-image: url(./assets/images/icon-upload.svg);
    background-repeat: no-repeat;
    background-size: 80%;
    background-position: center;
    width: 40px;
    height: 40px;
    border-radius: 20%;
    background-color: var(--upload-icon);
    border: 1px solid var(--gray-dark);
}

.avatar-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--gray-light);
}

.avatar-info p {
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
}

.form-group label {
    margin-top: 10px;
}

.info-icon {
    background-image: url(./assets/images/icon-info.svg);
    background-repeat: no-repeat;
    background-size: 80%;
    background-position: center;
    width: 20px;
    height: 20px;
}

.name-input {
    background-color: var(--input);
    border: 1px solid var(--gray-dark);
    border-radius: 10px;
    padding: 10px;
    width: 100%;
}

.email-input {
    background-color: var(--input);
    border: 1px solid var(--gray-dark);
    border-radius: 10px;
    padding: 10px;
    width: 100%;
}

.github-input {
    background-color: var(--input);
    border: 1px solid var(--gray-dark);
    border-radius: 10px;
    padding: 10px;
    width: 100%;
}

.submit-button {
    background-color: var(--orange);
    border: 1px solid var(--orange-dark);
    border-radius: 10px;
    padding: 10px;
    width: 100%;
    font-weight: 700;
    margin-top: 10px;
}

input {
    color: var(--white);
}

input:focus {
    outline: 1px solid var(--gray);
}

button:focus {
    outline: 1px solid var(--gray);
}

.error-message {
    font-size: 12px;
    font-weight: 400;
    width: 100%;
    color: var(--orange);
}

input.error {
    border: 2px solid var(--orange);
    background-color: hsl(7, 88%, 67%, 0.1);
}

.avatar-container.error {
    border: 2px solid var(--orange);
    background-color: hsl(7, 88%, 67%, 0.1);
}

input.focused,
.avatar-container.focused {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.ticket-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 32vh;    
    width:100%;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ticket {
    background-image: url(./assets/images/pattern-ticket.svg);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    border-radius: 10px;
    width: 90%;
    height: 280px;
    position: relative;
}

.ticket-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.ticket-header {
    position: relative;
    width: 100%;
    height: 120px;
}

.ticket-logo {
    width: 180px;
    height: 100px;
    position: absolute;
    top: 19px;
    left: 2px;
}

.ticket-date {
    color: var(--gray-light);
    position: absolute;
    top: 88px;
    left: 43px;
    font-size: 15px;
}

.ticket-number {
    color: var(--gray);
    position: absolute;
    top: 109px;
    right: -19px;
    font-size: 20px;
    transform: rotate(90deg);
}

.ticket-user-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    top: 151px;
    left: 21px;
    gap: 10px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 10%;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.user-name {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.user-email {
    color: #888;
    font-size: 14px;
    margin: 0;
}

.github-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
}

.github-icon {
    width: 20px;
    height: 20px;
}

.github-username {
    color: #888;
    font-size: 14px;
    margin: 0;
}

.avatar-container:hover {
    background-color: var(--input);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input:hover {
    background-color: var(--input);
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: var(--orange-dark);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.remove-image-btn:hover {
    background-color: var(--input) !important;
    color: var(--white) !important;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.change-image-btn:hover {
    background-color: var(--input) !important;
    color: var(--white) !important;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

@media (min-width: 768px) and (max-width: 1023px) {
    body {
        background-image: url(./assets/images/background-tablet.png);
    }
    
    .ticket {
        width: 70%;
        height: 300px;
    }
    
    .ticket-content {
        padding: 25px;
    }
    
    .ticket-logo {
        width: 190px;
        height: 105px;
    }
    
    .ticket-date {
        font-size: 16px;
    }
    
    .ticket-number {
        font-size: 19px;
    }
    
    .user-avatar {
        width: 55px;
        height: 55px;
    }
    
    .user-name {
        font-size: 17px;
    }
    
    .user-email {
        font-size: 15px;
    }
    
    .github-username {
        font-size: 15px;
    }
}

@media (min-width: 1024px) {
    body {
        background-image: url(./assets/images/background-desktop.png);
    }

    .logo {
        width: 300px;
        height: 30px;
    }

    .background-circle {
        background-size: 15%;
        top: -65px;
        left: 60px;
    }

    .background-circle-2 {
        background-size: 10%;
        background-position: 65vw 50vh;
    }

    .background-line-top {
        background-position: 66vw 70px;
    }

    .background-line-bottom {
        background-image: url(./assets/images/pattern-squiggly-line-bottom-desktop.svg);
        background-size: 60%;
    }

    .titles h1 {
        font-size: 40px;
        line-height: 48px;
        width: 40%;
    }

    .titles h2 {
        font-size: 20px;
        line-height: 28px;
    }

    form {
        width: 100%;
        padding-left: 40vw;
        padding-right: 40vw;
    }

    .ticket-container {
        min-height: 49vh;
    }

    .ticket {
        width: 28vw;
    }

    .ticket-content {
        padding: 30px;
    }

    .ticket-logo {
        width: 254px;
        height: 110px;
        top: -43px;
        left: 2px;
    }

    .ticket-date {
        font-size: 18px;
        top: 46px;
        left: 61px;
    }

    .ticket-number {
        font-size: 31px;
        top: 89px;
        right: -29px;
    }

    .ticket-user-info {
        top: 164px;
        left: 21px;
    }

    .user-avatar {
        width: 90px;
        height: 90px;
    }

    .user-name {
        font-size: 25px;
    }

    .user-email {
        font-size: 20px;
    }

    .github-username {
        font-size: 20px;
    }
}