/* Identity Pages Layout Styles - Shared by Login, SignUp, and other Auth pages */

/* Reset html and body for full viewport coverage */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;  /* Prevent scrollbars on html/body, scroll happens in fixed-background */
}

/* Full height container - Fixed to handle tall content properly */
.full-height {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;  /* Changed from center to flex-start to prevent top cutoff */
    justify-content: center;
    padding: 20px 0;

    /* When content is shorter than viewport, center it */
    @supports (height: 100vh) {
        align-items: safe center;  /* Use safe keyword to prevent data loss when centering */
    }
}

/* Main card container - Fixed to handle tall content properly */
.identity-card-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;  /* Changed from center to prevent vertical centering issues */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: auto;  /* This helps with vertical centering when content is short */
    margin-bottom: auto;  /* Combined with flex parent, centers when possible */
}

/* Identity card with shadow and rounded corners */
.identity-card {
    display: flex;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    background: white;
    min-height: 500px;
}

/* Logo Styling */
.logo.single {
    display: inline-block;
    width: 220px;
    height: 60px;
    background-image: url("/images/common/velogic-logo-blue.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    margin-bottom: 30px;
}

/* Form Side Styling */
.form-side {
    width: 50%;
    padding: 60px;
    background-color: #f5fbff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-side section {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.form-side h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

/* Form Styling */
.form-row {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

/* Form Controls - Bootstrap overrides */
.form-control {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #d3d8db;
    padding: 10px 12px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: #0068a6;
    box-shadow: 0 0 0 3px rgba(0, 104, 166, 0.1);
    outline: none;
}

/* Select dropdown styling */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}

/* Checkbox Styling */
.checkbox {
    margin: 20px 0;
}

.checkbox label {
    display: flex;
    align-items: flex-start !important;
    cursor: pointer;
    user-select: none;
}

.form-check-input {
    margin-right: 10px;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox label a {
    color: #0068a6;
    text-decoration: underline;
}

.checkbox label a:hover {
    color: #23628c;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Button Styling */
.btn {
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background-color: #0068a6;
    border-color: #0068a6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #23628c;
    border-color: #23628c;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-lg {
    padding: 14px 20px;
    font-size: 18px;
}

.w-100 {
    width: 100%;
}

/* Links below form */
.form-side p {
    margin-top: 15px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.form-side p a {
    color: #0068a6;
    text-decoration: none;
    font-weight: 500;
}

.form-side p a:hover {
    text-decoration: underline;
}

/* Info Side Styling */
.info-side {
    width: 50%;
    padding: 60px;
    background: linear-gradient(135deg, #e1e7eb 0%, #d3d8db 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-side h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 600;
}

.info-side h3 {
    color: #0068a6;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 500;
}

.info-content {
    color: #555;
    line-height: 1.6;
}

.info-content ul {
    padding-left: 0;
    list-style: none;
}

.info-content ul li {
    padding: 12px 0;
    padding-left: 28px;
    position: relative;
}

.info-content ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0068a6;
    font-weight: bold;
    font-size: 18px;
}

.info-content ul ul {
    margin-top: 8px;
    padding-left: 20px;
}

.info-content ul ul li {
    padding: 6px 0;
    padding-left: 20px;
    font-size: 14px;
}

.info-content ul ul li:before {
    content: "◦";
    color: #00b9f2;
    font-size: 14px;
}

.info-content strong {
    color: #333;
    font-weight: 600;
}

/* Trust badges section */
.trust-badges {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.trust-badges p {
    margin-bottom: 10px;
    font-size: 16px;
}

.trust-badges p strong {
    color: #0068a6;
}

.security-note {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Logo section in info side */
.logo-section {
    margin-top: 40px;
    text-align: center;
}

.logo-section img {
    max-width: 200px;
    width: 100%;
    height: auto;
    opacity: 0.8;
}

/* Validation Messages */
.text-danger,
.field-validation-error {
    color: #ff3838;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

.validation-summary-errors {
    background-color: #ffebee;
    border: 1px solid #ff3838;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 20px;
}

.validation-summary-errors li {
    color: #ff3838;
    font-size: 14px;
}

[role="alert"]:empty {
    display: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    /* Mobile/tablet: Reduce padding, stack card vertically */
    .fixed-background {
        padding: 15px;
        align-items: flex-start;  /* Start from top on mobile */
        padding-top: 30px;
    }

    .identity-card {
        flex-direction: column;
        max-width: 600px;
        margin: 0 auto;
    }

    .form-side,
    .info-side {
        width: 100%;
        padding: 40px;
    }

    .form-side {
        padding-bottom: 30px;
    }

    .info-side {
        padding-top: 30px;
    }

    .info-side h2 {
        font-size: 26px;
    }

    .logo-section img {
        max-width: 150px;
    }
}

@media (max-width: 576px) {
    /* Very small mobile screens - Allow more background visibility */
    .fixed-background {
        padding: 15px;  /* More padding to show background */
        padding-top: 20px;
    }

    .identity-card {
        width: calc(100% - 30px);  /* Allow 15px margin on each side for background */
        max-width: 500px;  /* Limit maximum width */
        border-radius: 8px;
    }

    .full-height {
        padding: 15px;  /* Match fixed-background padding */
    }

    .identity-card-container {
        padding: 0 15px;  /* Add padding to show background on sides */
    }

    .form-side,
    .info-side {
        padding: 30px 20px;
    }

    .form-side h2 {
        font-size: 24px;
    }

    .info-side h2 {
        font-size: 22px;
    }

    .logo.single {
        width: 180px;
        height: 50px;
    }
}

/* Background for fixed-background container from layout - Always cover full screen */
.fixed-background {
    /* Full viewport coverage - no padding or margins */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;

    /* Background image - always cover, center cropped if needed */
    background: url("https://ik.imagekit.io/vfframes/publicsite/login-background_W3k_slOoo.jpg") no-repeat center center;
    background-size: cover;

    /* Content positioning */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;  /* Allow scrolling when content is too tall */
    padding: 20px;
}
/* Additional styles for SignUp page - No inline styles allowed */

/* Title styles */
.signup-title {
    margin-bottom: 20px;
    color: #333;
}

/* Submit button container */
.submit-container {
    margin-top: 20px;
}

/* Account link container */
.account-link-container {
    margin-top: 1em;
}

/* Pricing link styling */
.pricing-link {
    color: #007bff;
    text-decoration: underline;
}

.pricing-link:hover {
    color: #0056b3;
}

/* Account benefits info box */
.benefits-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.benefits-box h4 {
    margin-bottom: 15px;
}

.benefits-box ul {
    margin: 0;
    padding-left: 20px;
}

/* Logo section override for SignUp page */
.logo-section-signup {
    margin-top: 40px;
    text-align: center;
}

.logo-section-signup img {
    max-width: 200px;
    width: 100%;
    height: auto;
    opacity: 0.8;
}

/* Spinner styles */
.spinner-border {
    display: none;
}

.spinner-border.show {
    display: inline-block !important;
}

/* Font family for all text elements - Montserrat */
body,
.form-side h2,
.info-side h2,
.info-side h3,
.form-group label,
.btn,
p, a, li, span {
    font-family: 'Montserrat', sans-serif;
}


/* Container for identity pages - Minimal styling, background does the work */
.identity-container {
    /* Let the fixed-background child handle all positioning */
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;  /* Prevent scrollbar on container, scroll happens in fixed-background */
}

/* Login page specific styles */
.login-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

/* Logout page specific styles */
.logout-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

.logout-message {
    color: #555;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
}

.logout-actions {
    margin-top: 20px;
}

/* Secondary button style */
.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Utility classes */
.mb-3 {
    margin-bottom: 1rem;
}

/* Redirect page styling */
.redirect-message {
    text-align: center;
    padding: 50px;
}

/* Form overlay state when submitting */
.form-submitting {
    opacity: 0.7;
    pointer-events: none;
}

/* Single column layout for logout page */
.logout-single-column .identity-card {
    max-width: 500px;
    margin: 0 auto;
}

.logout-single-column .form-side.logout-centered {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logout-single-column .form-side section {
    width: 100%;
    max-width: 400px;
}
