/* Role Selection Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Helvetica+Neue:wght@400;500&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #1a1a1a; /* Fallback color while image loads */
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Better mobile performance */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ensure smooth loading */
    transition: background-image 0.3s ease;
}

/* Preload optimization for mobile */
@media (max-width: 768px) {
    body {
        background-attachment: scroll; /* Better for mobile */
        background-size: cover;
        background-position: center center;
        /* Force hardware acceleration for smoother rendering */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: background-image;
        /* Ensure background image is still visible */
        background-image: url('../images/background.jpg') !important;
    }
    
    /* Add loading state - only show if image hasn't loaded */
    body:not(.image-loaded)::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
        z-index: -1;
        opacity: 1;
        transition: opacity 0.5s ease;
    }
    
    /* Hide loading background when image loads */
    body.image-loaded::before {
        opacity: 0;
    }
}

.role-selection-container {
    text-align: center;
}

/* Logo and Title Block */
.logo-title-block {
    margin-bottom: 40px;
}

.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 17.61px;
}

.logo-icon {
    width: 38.7px;
    height: auto;
}

.logo-text {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 24.86px;
    letter-spacing: 0.45rem;
    color: #FAFAFB;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Main Selection Block */
.selection-block {
    width: 324px;
    height: 321px;
    background: #1A1A1A;
    border-radius: 18px;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.selection-content {
    padding: 30px 18px 0;
    height: calc(100% - 43.2px);
    box-sizing: border-box;
}

.selection-title {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 16.2px;
    letter-spacing: 30%;
    color: #FAFAFB;
    text-align: center;
    margin-bottom: 37px;
}

.role-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    width: 100%;
}

.role-button {
    width: 288px;
    height: 34px;
    border-radius: 9px;
    border: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 10.8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-button.crew-member {
    background: #C29D78;
    color: #FAFAFB;
}

.role-button.crew-member:hover {
    background: #B08A65;
    transform: translateY(-1px);
}

.role-button.recruiter {
    background: transparent;
    color: #FAFAFB;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.role-button.recruiter:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.or-divider {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 10.8px;
    color: #FAFAFB;
    margin: 0;
}

.terms-text {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 10.8px;
    color: #FAFAFB;
    text-align: center;
    line-height: 1.4;
    margin-top: 17.4px;
    padding: 0 20px;
}

.terms-text a {
    color: #C29D78;
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms-text a:hover {
    color: #B08A65;
    text-decoration: underline;
}

/* Bottom Login Block */
.login-block {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 324px;
    height: 43.2px;
    background: #2C2C2C;
    border-radius: 0 0 18px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-text {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 10.8px;
    color: #FAFAFB;
    text-align: center;
}

.login-text a {
    color: #FAFAFB;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.login-text a:hover {
    color: #C29D78;
}

.back-link {
    margin-top: 10px;
    text-align: center;
}

.back-button {
    color: #C29D78;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-button:hover {
    color: #FAFAFB;
}

/* Form Fields */
.form-fields {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13.5px;
    margin-bottom: 17.4px;
}

/* Form Errors */
.form-errors {
    width: 100%;
    margin-bottom: 10px;
}

.error-message {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    text-align: left;
}

.error-field {
    color: #C29D78;
    font-weight: 500;
    margin-right: 5px;
}

.error-text {
    color: #FFFFFF;
    font-size: 12px;
    line-height: 1.3;
}

.field-error {
    color: #FFFFFF;
    font-size: 11px;
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border-left: 2px solid #FFFFFF;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.3;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile styles moved to mobile/registration_mobile.css */

/* Additional mobile fixes for role selection page */
@media (max-width: 768px) {
    /* Ensure body has enough height for mobile devices - slightly increased from original */
    body {
        min-height: 100vh;
        min-height: 100dvh; /* Use dynamic viewport height for better mobile support */
        padding-bottom: 10px; /* Reduced padding to match original design better */
    }
    
    /* Ensure the role selection container has proper spacing - slightly increased height */
    .role-selection-container {
        min-height: calc(100vh - 20px);
        min-height: calc(100dvh - 20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 10px 0;
    }
    
    /* Keep terms text spacing minimal to match desktop design */
    .terms-text {
        margin-bottom: 15px !important;
        padding-bottom: 5px !important;
    }
    
    /* Restore desktop design for login block - absolute positioning at bottom */
    .login-block {
        position: absolute !important; /* Restore absolute positioning like desktop */
        bottom: 0 !important; /* Position at very bottom like desktop */
        left: 0 !important; /* Full width from left */
        right: 0 !important; /* Full width to right */
        width: 100% !important; /* Full width of container */
        margin-top: 0 !important; /* Remove margin-top */
        border-radius: 0 0 18px 18px !important; /* Only bottom rounded corners like desktop */
    }
    
    /* Adjust selection block for mobile - keep original height */
    .selection-block {
        margin-bottom: 0; /* Remove margin since login block is absolute */
        height: 321px !important; /* Restore original height */
        min-height: 321px;
    }
    
    .selection-content {
        padding: 30px 0 0 !important; /* Remove side padding on mobile */
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    body {
        min-height: 100vh;
        min-height: 100dvh;
        padding-bottom: 15px; /* Reduced padding to match design */
    }
    
    .role-selection-container {
        min-height: calc(100vh - 30px);
        min-height: calc(100dvh - 30px);
        padding: 15px 0;
    }
    
    .terms-text {
        margin-bottom: 20px !important;
        padding-bottom: 10px !important;
        font-size: 11px !important;
        line-height: 1.5 !important;
    }
    
    /* Keep absolute positioning for very small screens too - same as desktop design */
    .login-block {
        position: absolute !important;
        bottom: 0 !important; /* Position at very bottom like desktop */
        left: 0 !important; /* Full width from left */
        right: 0 !important; /* Full width to right */
        width: 100% !important; /* Full width of container */
        margin-top: 0 !important;
        border-radius: 0 0 18px 18px !important; /* Only bottom rounded corners like desktop */
    }
}