/* Core styles for signup landing page */
:root {
    /* Primary colors */
    --primary-green: #9ACB48;
    --primary-purple: #5144A1;
    --primary-grey: #CECECE;
    --primary-navy: #5144A1;
    --primary-black: #1A1A1A;

    /* Light colors */
    --light-cream: #F9F9F0;
    --light-lavender: #F0F0F9;
    --light-blue: #E9EFF2;
    --light-gray: #808080;
    --light-white: #FFFFFF;

    /* Font */
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--light-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Signup Page */
.signup-page {
    display: flex;
    height: 100vh;
}

.signup-image {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-image: url('/images/landing-bg-1.webp');
}

.signin-image {
    background-image: url('/images/landing-bg-2.webp');
}


.signup-section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Center align the content */
    width: 100%;
}

.signup-section form {
    width: 60%;
    max-width: 500px; /* Prevent form from getting too wide on large screens */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Container for form elements - 60% of parent width */
.signup-section-content {
    width: 100%;
}

.signup-section .signup-logo {
    margin-bottom: 50px;
    width: 60%;
}

.signup-section .signup-logo img {
    height: 89px;
}

/* Typography styles */
.signup-section h1 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 36px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: var(--primary-navy);
    margin-bottom: 20px;
    width: 60%;
}

.signup-section .signup-instructions {
    font-size: 18px;
    margin-bottom: 30px;
    width: 60%;
}

.signup-section .signup-instructions b {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 0px;
    vertical-align: middle;
    display: block;
    margin-bottom: 5px;
}

.signup-section .signup-instructions br + span,
.signup-section .signup-instructions br + text {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 0px;
    vertical-align: middle;
    display: block;
}

/* Input styles with placeholder color */
.signup-section input[type="email"],
.signup-section input[type="text"],
.signup-section input[type="password"],
.signup-section input[type="number"],
.signup-section textarea,
.signup-section select {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.1);
}

/* Placeholder color for all browsers */
.signup-section input::placeholder,
.signup-section textarea::placeholder {
    color: var(--light-gray);
    opacity: 1; /* Firefox */
}

/* Internet Explorer 10-11 */
.signup-section input:-ms-input-placeholder,
.signup-section textarea:-ms-input-placeholder {
    color: var(--light-gray);
}

/* Microsoft Edge */
.signup-section input::-ms-input-placeholder,
.signup-section textarea::-ms-input-placeholder {
    color: var(--light-gray);
}

.signup-section .btn-primary {
    background-color: var(--primary-navy);
    color: white !important;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.signup-section .btn-primary:hover {
    background-color: var(--primary-purple);
    color: white !important;
}

.signup-section .divider {
    text-align: center;
    margin: 20px 0;
    color: #777;
    width: 60%;
    max-width: 500px; /* Consistent with other elements */
}

.signup-section .social-signup {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 60%;
    max-width: 500px; /* Prevent social buttons from getting too wide */
}

.signup-section .social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid var(--primary-grey);
    padding: 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    gap: 10px;
    width: 100%;
    transition: all 0.3s ease;
    color: var(--primary-black);
    text-decoration: none;
}

.signup-section .social-btn:hover {
    background-color: var(--light-lavender);
    border-color: var(--primary-purple);
}

.signup-section .social-btn img {
    height: 20px;
}

.signup-section .signup-footer {
    text-align: center;
    margin-top: 30px;
    width: 60%;
    max-width: 500px; /* Consistent with other elements */
}

.signup-footer a {
    color: var(--primary-purple);
    text-decoration: none;
}

.signup-footer a:hover {
    text-decoration: underline;
}

/* Remember me checkbox and forgot password link */
.remember-me {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    font-size: 14px;
}

.remember-me label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
}

.forgot-password {
    color: var(--primary-purple);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Input group for validation */
.input-group {
    width: 100%;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    margin-bottom: 0;
}

/* Password input group with toggle button */
.password-input-group {
    position: relative;
}

.password-input-group input {
    padding-right: 50px; /* Make room for the toggle button */
}

.password-toggle-btn {
    position: absolute;
    right: 15px;
    top: 40%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-gray);
    transition: color 0.2s ease;
    z-index: 2;
}

.password-toggle-btn:hover {
    color: var(--primary-purple);
}

.password-toggle-btn:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
    border-radius: 4px;
}

.password-icon {
    width: 20px;
    height: 20px;
}

/* Error message */
.error-message {
    color: #d9534f;
    margin-bottom: 15px;
    text-align: center;
    display: block; /* Show by default when content exists */
}

.error-message:empty {
    display: none; /* Hide when empty */
}

/* Field-specific error message */
.field-error {
    color: #d9534f;
    font-size: 12px;
    margin-top: 5px;
    text-align: left;
}

/* Invalid input styling */
.is-invalid {
    border: 1px solid #d9534f !important;
    background-color: rgba(213, 83, 79, 0.05);
}

/* Responsive styles */

/* Large tablets and small desktops (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .signup-section {
        padding: 30px;
    }

    .signup-section form {
        width: 70%;
    }

    .signup-section .signup-logo {
        width: 70%;
    }
}

/* Tablets and large phones (481px - 768px) */
@media (max-width: 768px) {
    .signup-page {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .signup-image {
        height: 180px;
        background-position: center;
    }

    .signup-section {
        padding: 30px 20px;
        min-height: calc(100vh - 180px);
    }

    .signup-section form,
    .signup-section .social-signup,
    .signup-section .divider,
    .signup-section .signup-footer,
    .signup-section h1,
    .signup-section .signup-instructions {
        width: 100%;
        max-width: 400px;
    }

    .signup-section .signup-logo {
        width: 80%;
        margin-bottom: 30px;
    }

    .signup-section .signup-logo img {
        height: 70px;
    }

    .signup-section h1 {
        font-size: 28px;
        line-height: 36px;
        margin-bottom: 15px;
    }

    .signup-section .signup-instructions {
        font-size: 15px;
        line-height: 24px;
        margin-bottom: 25px;
    }

    /* Improve social buttons for tablets */
    .signup-section .social-btn {
        padding: 15px;
        font-size: 14px;
        margin-bottom: 12px;
    }

    .signup-section .social-btn img {
        height: 22px;
    }

    /* Better spacing for form elements */
    .signup-section input[type="email"],
    .signup-section input[type="password"] {
        padding: 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        margin-bottom: 18px;
    }

    .signup-section .btn-primary {
        padding: 16px;
        font-size: 16px;
        margin-bottom: 25px;
    }

    .remember-me {
        font-size: 15px;
        margin-bottom: 25px;
    }
}

/* Small phones and mobile devices (320px - 480px) */
@media (max-width: 480px) {
    .signup-page {
        min-height: 100vh;
    }

    .signup-image {
        height: 150px;
    }

    .signup-section {
        padding: 20px 15px;
        min-height: calc(100vh - 150px);
    }

    .signup-section form,
    .signup-section .social-signup,
    .signup-section .divider,
    .signup-section .signup-footer,
    .signup-section h1,
    .signup-section .signup-instructions {
        width: 100%;
        max-width: none;
    }

    .signup-section .signup-logo {
        width: 60%;
        margin-bottom: 25px;
    }

    .signup-section .signup-logo img {
        height: 60px;
    }

    .signup-section h1 {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 12px;
    }

    .signup-section .signup-instructions {
        font-size: 14px;
        line-height: 22px;
        margin-bottom: 20px;
    }

    /* Mobile-optimized form inputs */
    .signup-section input[type="email"],
    .signup-section input[type="password"] {
        padding: 18px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        margin-bottom: 16px;
        border-radius: 8px;
    }

    /* Mobile password toggle adjustments */
    .password-input-group input {
        padding-right: 55px; /* More space for larger touch target */
    }

    .password-toggle-btn {
        right: 12px;
        padding: 10px; /* Larger touch target for mobile */
        width: 44px; /* Minimum touch target size */
        height: 44px;
    }

    .signup-section .btn-primary {
        padding: 18px;
        font-size: 16px;
        margin-bottom: 20px;
        border-radius: 8px;
        min-height: 50px; /* Better touch target */
    }

    /* Mobile-optimized social buttons */
    .signup-section .social-btn {
        padding: 16px 12px;
        font-size: 14px;
        margin-bottom: 10px;
        border-radius: 8px;
        min-height: 50px; /* Better touch target */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .signup-section .social-btn img {
        height: 20px;
        margin-right: 8px;
    }

    /* Better remember me section for mobile */
    .remember-me {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        font-size: 14px;
        margin-bottom: 20px;
    }

    .remember-me label {
        order: 1;
    }

    .forgot-password {
        order: 2;
        align-self: flex-end;
        font-size: 14px;
        padding: 8px 0; /* Better touch target */
    }

    /* Mobile error messages */
    .error-message {
        font-size: 14px;
        margin-bottom: 12px;
        padding: 10px;
        border-radius: 6px;
        background-color: rgba(213, 83, 79, 0.1);
    }

    .field-error {
        font-size: 12px;
        margin-top: 4px;
    }

    /* Mobile footer */
    .signup-section .signup-footer {
        margin-top: 25px;
        font-size: 14px;
        line-height: 20px;
    }

    .signup-footer a {
        padding: 8px 0; /* Better touch target */
        display: inline-block;
    }
}

/* Extra small screens (320px and below) */
@media (max-width: 320px) {
    .signup-section {
        padding: 15px 10px;
    }

    .signup-section .signup-logo img {
        height: 50px;
    }

    .signup-section h1 {
        font-size: 22px;
        line-height: 28px;
    }

    .signup-section input[type="email"],
    .signup-section input[type="password"],
    .signup-section .btn-primary,
    .signup-section .social-btn {
        padding: 16px 12px;
    }

    /* Small mobile password toggle adjustments */
    .password-input-group input {
        padding-right: 50px;
    }

    .password-toggle-btn {
        right: 10px;
        width: 40px;
        height: 40px;
        padding: 8px;
    }
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .signup-page {
        height: auto;
        min-height: 100vh;
    }

    .signup-image {
        height: 120px;
    }

    .signup-section {
        padding: 20px;
        min-height: calc(100vh - 120px);
    }

    .signup-section .signup-logo {
        margin-bottom: 20px;
    }

    .signup-section .signup-logo img {
        height: 50px;
    }

    .signup-section h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .signup-section .signup-instructions {
        margin-bottom: 15px;
    }

    .signup-section input[type="email"],
    .signup-section input[type="password"] {
        margin-bottom: 12px;
    }

    .signup-section .btn-primary {
        margin-bottom: 15px;
    }

    .remember-me {
        margin-bottom: 15px;
    }

    .signup-section .social-btn {
        margin-bottom: 8px;
    }

    .signup-section .signup-footer {
        margin-top: 15px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .signup-section .social-btn img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Focus improvements for accessibility */
@media (max-width: 768px) {
    .signup-section input[type="email"]:focus,
    .signup-section input[type="password"]:focus {
        outline: 2px solid var(--primary-navy);
        outline-offset: 2px;
    }

    .signup-section .btn-primary:focus,
    .signup-section .social-btn:focus {
        outline: 2px solid var(--primary-navy);
        outline-offset: 2px;
    }

    .forgot-password:focus,
    .signup-footer a:focus {
        outline: 2px solid var(--primary-purple);
        outline-offset: 2px;
        border-radius: 4px;
    }
}
