/*
 * Common CSS for all registration-related pages
 * - /signup
 * - /verify-email
 * - /email-confirmed
 * - /create-password
 * - /register/start
 */

/* ===== Variables ===== */
: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', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background: #F7F8FA;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ===== Layout Styles ===== */

/* Two types of layouts: split screen and centered */

/* 1. Split Screen Layout (for signup and verify-email) */
.signup-page {
    display: flex;
    height: 100vh;
}

.signup-image {
    flex: 1;
    background-size: cover;
    background-position: center;
}

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

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

/* 2. Centered Layout (for email-confirmed, create-password, register/start) */
.container {
    width: 100%;
    max-width: 800px;
    margin: 64px auto;
    background: #FFFFFF;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.05);
    padding: 40px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 760px;
}

/* ===== Logo Styles ===== */
.logo-container {
    margin-bottom: 40px;
    width: 200px;
    text-align: center;
}

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

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

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

/* ===== Typography Styles ===== */
h1, .heading {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 42px;
    line-height: 50px;
    text-align: center;
    color: #4D5E80;
    margin: 20px 0 20px 0;
    width: 100%;
    max-width: 430px;
}

.signup-section h1 {
    font-weight: 700;
    font-size: 24px;
    line-height: 36px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: var(--primary-navy);
    margin-bottom: 20px;
    width: 60%;
}

.message {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
    color: #1A1A1A;
    margin-bottom: 40px;
    width: 100%;
}

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

.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;
}

/* ===== Form Styles ===== */
.form-content {
    width: 100%;
    max-width: 487px;
    margin-bottom: 30px;
    padding-right: 0;
    overflow: visible;
}

.form-group {
    margin-bottom: 16px;
}

.form-label, .input-label {
    display: block;
    width: auto;
    height: 21px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 21px;
    color: #1A1A1A;
    margin-bottom: 6px;
    text-align: left;
}

.form-input, .input-field {
    width: 100%;
    height: 52px;
    background: #FFFFFF;
    border: 1px solid #CCCCCC;
    border-radius: 6px;
    padding: 8px 12px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #333333;
    margin-bottom: 5px;
    box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.1);
}

.form-input:focus, .input-field:focus {
    outline: none;
    border-color: #5144A1;
}

.input-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    width: 100%;
}

/* ===== Button Styles ===== */
.button-container {
    width: 100%;
    max-width: 487px;
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
}

.btn-primary {
    background: #5144A1;
    color: #FFFFFF;
    height: 44px;
}

.btn-wide {
    width: 100%;
    max-width: 487px;
}

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

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

/* ===== OTP Verification Styles ===== */
.verification-instructions {
    width: 60%;
    text-align: left;
}

.instruction-text {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--primary-black);
    text-align: left;
    width: 100%;
}

.email-highlight {
    font-weight: bold;
}

.expiry-note {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--primary-black);
    text-align: left;
    width: 100%;
}

.didnt-receive {
    margin-bottom: 30px;
    color: var(--primary-black);
    text-align: left;
    width: 100%;
}

.try-again {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
}

.try-again:hover {
    text-decoration: underline;
}

.otp-container {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
}

.otp-input {
    width: calc((100% - 40px) / 6);
    height: 60px;
    font-size: 24px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.1);
}

.otp-input:focus {
    border-color: var(--primary-purple);
    outline: none;
}

/* ===== Error Styles ===== */
.error-message {
    color: #d9534f;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.is-invalid {
    border: 1px solid #d9534f !important;
}

/* Hide elements by default */
.loading-spinner {
    display: none;
}

/* ===== Modal Styles ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 90%;
    max-width: 320px;
    display: none;
}

/* ===== Loading Styles ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #5144A1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Responsive Styles ===== */
@media (max-width: 840px) {
    .container {
        margin: 20px auto;
        width: 95%;
    }

    .signup-page {
        flex-direction: column;
        height: auto;
    }

    .signup-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .form-content,
    .button-container {
        max-width: 100%;
    }

    .logo-container {
        width: 150px;
    }

    .heading {
        font-size: 32px;
        line-height: 40px;
    }
}
