:root {
    --primary-color: #01c4af;
    --secondary-color: #ff7f50;
    --form-error-color: #ff2323;
}

/* General body styling */
body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #000;
    color: #fff;
}

/* phase row flex container styling */
.phase-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
    perspective: 600px;
    transition: 0.3s all ease;
}

/* second phase row flex container styling */
.phase-row-second {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    perspective: 600px;
}

/* fade-in keyframes for phase row */
@keyframes flipIn {
    from {
        opacity: 0;
        transform: rotateX(90deg);
        transform-origin: bottom center;
    }
    to {
        opacity: 1;
        transform: rotateX(0deg);
        transform-origin: bottom center;
    }
}

.phase-steps {
    opacity: 0;
    animation-name: flipIn;
    animation-duration: 1.3s;
    animation-fill-mode: forwards; /* Maintain the final state */
    transform-style: preserve-3d;
}

.phase-in-step-one {
    animation-delay: 0.6s;
}

.phase-in-step-two {
    animation-delay: 1s;
}

.phase-in-step-three {
    animation-delay: 1.4s;
}

.phase-in-step-four {
    animation-delay: 2.2s;
}

.phase-steps p {
    font-size: 22px;
    transition: 0.3s all ease;
}

/* Auth container styling */
.auth-container,
.login-page-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 95vh;
    height: 95vh;
}

/* Logo styling */
.logo-container {
    flex: 0 0 auto;
    width: 100%;
    position: relative;
    max-width: 600px;
    margin-bottom: 2rem;
}

.logo-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* logo reflection */
.logo-container::after {
    content: "";
    position: absolute;
    top: 55%;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../images/trax_crm_logo.f7ad03d793b8.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center top;
    transform: scaleY(-1);
    opacity: 0.5;
    /* Fade out reflection at bottom */
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    mask-image: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
}

/* Breadcrumbs styling */
.auth-container .breadcrumbs {
    margin-bottom: 2rem;
}

.auth-container .breadcrumbs a,
.auth-container p a {
    color: #fff;
}

/* Centering and styling the sign-in container */
#signin-container {
    width: 90%;
    max-width: 350px;
    box-sizing: border-box;
}

.auth-container form .flex-container {
    margin-top: 2.9rem;
}

/* Styling form groups */
#signin-container form div,
.auth-container form .flex-container {
	margin-bottom: 1rem;
}

/* Common label styling */
#signin-container form label,
.auth-container form label {
	display: block;
	margin-bottom: 0.5rem;
	color: #fff;
}

/* Common input field styling */
#signin-container form input[type="text"],
#signin-container form input[type="password"],
.auth-container form input[type="email"] {
	width: 100%;
	padding: 0.5rem;
	border: 2px solid var(--secondary-color);
	border-radius: 4px;
	transition: border-color 0.3s ease-in-out;
	box-sizing: border-box;
}

/* common focus state */
#signin-container form input:focus,
.auth-container form input:focus {
	border-color: var(--primary-color);
	outline: none;
}

/* Submit button styling */
#signin-container form button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

#signin-container form button:hover {
    background-color: var(--secondary-color);
}

#signin-container .help-links {
    justify-self: center;
    text-align: center;
}

#signin-container .help-links a {
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

#signin-container .help-links a:hover {
    color: var(--secondary-color);
}

/* Password reset form styling */
.password-reset-form-container {
    width: 40%;
}

.auth-container .module .form-row .flex-container,
.auth-container form .submit-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.auth-container form .submit-row input {
    width: 100%;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    background-color: var(--primary-color);
    transition: background-color 0.2s ease-in-out;
}

.auth-container form .submit-row input:hover {
    background-color: var(--secondary-color);
}

/* activate account button */
.submit-row button {
    margin: 0 auto;
    padding: 12px 15px;
    border: none;
    border-radius: 2px;
    color: #fff;
    background-color: #01c4af;
    transition: background-color 0.2s ease-in-out;
}

.submit-row-button:hover {
    background-color: #ff7f50;
}

.auth-container form label {
    display: block;
    margin-bottom: 0.5rem;
}

.auth-container form input[type="email"] {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--secondary-color);
    border-radius: 4px;
    transition: border-color 0.3s ease-in-out;
}

/* Fieldset styling */
fieldset.module {
    padding: 0;
    border: none;
}

/* Error message styling */
.error {
    padding: 0 5px;
    border-radius: 2px;
    font-size: 0.9rem;
    text-align: center;
    color: var(--form-error-color);
    background-color: #fff;
}

.error .errorlist {
    margin: 0 auto;
    padding: 5px;
    list-style: none;
}

/* login page error styling */
.login-page-wrapper .error {
    width: 90%;
    margin: 0 auto;
    font-size: 0.9rem;
    border: 3px solid var(--form-error-color);
    border-radius: 5px;
    color: #fff;
    background-color: #000;

}

/* footer styling */
.footer-container {
    margin-top: auto; /* put footer to bottom on short content */
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

.footer-container,
.footer-container a {
    color: #fff;
    font-size: 0.75rem;
}

.footer-container a {
    padding: 0 5px;
    white-space: nowrap;
    transition: 0.2s color ease;
}

.footer-container a:hover {
    color: var(--primary-color);
}

@media (max-width: 1024px) {
    .phase-row {
        justify-content: space-evenly;
        transition: 0.3s all ease;
    }

    .phase-steps p {
        font-size: 14px;
        transition: 0.3s all ease;
    }

    .auth-container p {
        font-size: 14px;
        margin: 0 50px;
    }

    .phase-in-step-four h3 {
        font-size: 1rem;
    }

    .footer-container,
    .footer-container a {
        font-size: 0.65rem;
    }
}

/* responsive styling for mobile devices */
@media (max-width: 600px) {
    .logo-container {
        max-width: 300px;
    }

    .auth-container p {
        font-size: 12px;
        margin: 0 35px;
    }

    .phase-in-step-four h3 {
        font-size: 0.9rem;
    }

    .footer-container {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .footer-container,
    .footer-container a {
        font-size: 0.55rem;
    }
}

body {
    min-height: 100vh;
    background-image: url("/static/trax/images/background-img__poly.46bc803fbe1f.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.terms-body {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    line-height: 1.55;
    overflow-y: auto;
    background-color: #000;
    background-image: none;
}

.terms-body ul {
    list-style: lower-roman;
}

.term-links {
    color: #01c4af;
    cursor: pointer;
    transform: color 0.1s ease-in-out;
}

.term-links:hover {
    color: #ff7f50;
}