@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* Default Light Mode */
:root {
    --primary-color-2: white;
    --primary-color-3: rgb(38, 38, 38);
    --primary-color-4: rgb(4,191,104);

    --background-color: rgb(240, 241, 242);

    --secondary-color-4: rgb(2, 89, 73);
}

/* Dark Mode */
[theme="dark"] {
    --primary-color-2: rgb(2,89,73);
    --primary-color-3: rgb(233, 233, 233);
    --primary-color-4: rgb(223, 223, 223);

    --background-color: rgb(1, 38, 28);

    --secondary-color-4: rgb(4, 191, 104);
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Montserrat", sans-serif;
    background-color: var(--background-color);
    margin: 0;
    cursor: default;
}

p{
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

.container-fluid-custom {
    padding: 0 1.5rem;
    align-items: center;
}

.icon {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 300ms ease;
    user-select: none;
}

.icon.active {
    transform: rotate(360deg);
}

/* Header */

#header {
    height: 72px;
    padding-top: 16px;
}

.header-p1{
    font-size: 32px;
    color: var(--secondary-color-4);
    user-select: none;
}

.row-end-c{
    display: flex;
    flex-direction: row;
    justify-content: end;
}
/* Form */

#form {
    height: 56ch;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: url('./assets/home-line.png');
    background-size: auto;
    background-repeat: no-repeat;
    background-position: center;
}

.form-container{
    height: max-content;
    width: max-content;
    padding: 1ch 4ch;
    border-radius: 6px;
    background-color: var(--primary-color-2);
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-direction: column;
}

.form-header-p1{
    font-size: 26px;
    padding-bottom: 16px;
    color: var(--primary-color-4);
    user-select: none;
}

.user-box {
    position: relative;
    width: 24ch;
}

#name, #surname, #email, #phone, #password, #confirm-password{
    padding: 0;
    margin-top: 0;
    margin-bottom: 6px;
}

.error-message {
    color: orangered;
    font-size: 12px;
    margin-top: 1px;
    margin-bottom: 4px;
}

.registration-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.form-container .user-box input {
    width: 100%;
    padding: 2px 0;
    font-size: 16px;
    color: var(--primary-color-3);
    margin-bottom: 30px;
    border: none;
    border-bottom: 1px solid var(--primary-color-3);
    outline: none;
    background: transparent;
}

.form-container .user-box label {
    position: absolute;
    top:0;
    left: 0;
    padding: 2px 0;
    font-size: 16px;
    color: var(--primary-color-3);
    pointer-events: none;
    transition: .5s;
}

.form-container .user-box input:focus ~ label,
.form-container .user-box input:valid ~ label {
    top: -20px;
    left: 0;
    color: rgb(4,191,104);
    font-size: 12px;
}

.button{
    width: 16ch;
    height: 42px;
    border-radius: 36px;
    background-color: rgb(4,191,104);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 300ms ease;
    font-size: 20px;
    color: white;
    border: none;
    margin: 0;
    user-select: none;
}

.button:hover{
    width: 18ch;
    background-color: rgb(1,38,28);
}

.form-text-p1{
    padding-top:14px;
    font-size: 14px;
    color: var(--primary-color-4);
    user-select: none;
}

.highlight-text {
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    text-underline: white;
    text-underline-offset: 4px;
    transition: all 300ms ease;
}
.highlight-text:hover{
    color: rgb(4,191,104);
    text-underline-offset: 6px;
}

/* Footer */

.footer{
    padding: 4px;
}

.footer-text-p1 {
    font-size: 14px;
    font-weight: normal;
    font-style: normal;
    color: rgb(3,140,115);
    transition: all 300ms ease;
    user-select: none;
}

.footer-text-p1:hover{
    color: var(--secondary-color-4);
}

#dd-icon{
    width: 24px;
    height: 24px;
    user-select: none;
}

.custom-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

#success {
    height: 56ch;
    display: flex;
    align-items: center;
    justify-content: center;
}

@supports (animation: grow .5s cubic-bezier(.25, .25, .25, 1) forwards) {
    .tick {
        stroke-opacity: 0;
        stroke-dasharray: 29px;
        stroke-dashoffset: 29px;
        animation: draw .5s cubic-bezier(.25, .25, .25, 1) forwards;
        animation-delay: .6s;

    }
    .circle {
        fill-opacity: 0;
        stroke: rgb(4,191,104);
        stroke-width: 16px;
        transform-origin: center;
        transform: scale(0);
        animation: grow 1s cubic-bezier(.25, .25, .25, 1.25) forwards;

    }
}

@keyframes grow {
    60% {
        transform: scale(.8);
        stroke-width: 4px;
        fill-opacity: 0;
    }
    100% {
        transform: scale(.9);
        stroke-width: 8px;
        fill-opacity: 1;
        fill: rgb(4,191,104);
    }
}

@keyframes draw {
    0%, 100% { stroke-opacity: 1; }
    100% { stroke-dashoffset: 0; }
}

@media screen and (max-width: 420px) {

    .header-p1{
        font-size: 26px;
    }

    .icon {
        width: 28px;
        height: 28px;
    }

    #form {
        height: 64ch;
    }

    .form-header-p1{
        font-size: 24px;
    }

    .form-container{
        padding: 1ch 3ch;
    }

    #success {
        height: 64ch;
    }

}