/* Modern Login Page Styles */
.login-page-wrapper {
    min-height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.login-left-section {
    flex: 0 0 40%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.login-right-section {
    flex: 0 0 60%;
    background-color: #00A89C;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

/* Curved top transition */
.login-right-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    width: 200px;
    height: 200px;
    background: #00A89C;
    border-radius: 50%;
    z-index: 1;
}

.login-right-section::after {
    content: '';
    position: absolute;
    top: -150px;
    left: -50px;
    width: 300px;
    height: 300px;
    background: #00A89C;
    border-radius: 50%;
    z-index: 1;
}

/* Login Card */
.login-card {
    background: white;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
}

/* Wider card for registration form */
.register-form-columns {
    margin-bottom: 1.5rem;
}

.register-form-columns ~ .login-btn,
.register-form-columns ~ .login-links {
    margin-top: 1rem;
}

/* Make card wider for registration form */
.register-card {
    max-width: 600px;
}

.login-card-title {
    color: #00A89C;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.login-form-group {
    margin-bottom: 1.5rem;
}

/* Two-column layout for registration form */
.register-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: start;
}

.register-form-column {
    display: flex;
    flex-direction: column;
}

.register-form-column .login-form-group {
    margin-bottom: 1.5rem;
}

.login-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: white;
}

.login-form-input:focus {
    outline: none;
    border-color: #00A89C;
    box-shadow: 0 0 0 3px rgba(0, 168, 156, 0.1);
}

.login-form-input::placeholder {
    color: #999;
}

.login-form-input select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.login-form-input select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300A89C' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.login-form-input select option {
    padding: 0.5rem;
}

.consent-checkbox-wrapper {
    margin-top: 0.5rem;
}

.consent-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #666;
}

.consent-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #00A89C;
}

.consent-checkbox-text {
    flex: 1;
}

.consent-checkbox-text a {
    color: #00A89C;
    text-decoration: none;
    font-weight: 600;
}

.consent-checkbox-text a:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 0.875rem;
    background-color: #00A89C;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.login-btn:hover:not(:disabled) {
    background-color: #008B7F;
    color: white !important;
}

.login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.9;
    transform: none;
}

.login-btn:visited,
.login-btn:link {
    color: white !important;
}

.login-btn-text {
    display: inline-block;
}

.login-btn.loading .login-btn-text {
    opacity: 0;
}

.login-btn-spinner {
    position: absolute;
    display: none;
    align-items: center;
    justify-content: center;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.login-btn.loading .login-btn-spinner {
    display: flex !important;
}

.login-btn-spinner .spinner {
    width: 20px;
    height: 20px;
    color: white;
    animation: spin 0.8s linear infinite;
}

.login-btn-spinner .spinner-circle {
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 31.416;
    animation: spinner-dash 1.5s ease-in-out infinite;
}

@keyframes spinner-dash {
    0% {
        stroke-dasharray: 0 31.416;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 15.708 15.708;
        stroke-dashoffset: -7.854;
    }
    100% {
        stroke-dasharray: 31.416 0;
        stroke-dashoffset: -31.416;
    }
}

.login-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #666;
}

.login-links a {
    color: #00A89C;
    text-decoration: none;
    font-weight: 600;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: #999;
    font-size: 0.875rem;
}

.login-separator::before,
.login-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.login-separator::before {
    margin-right: 0.5rem;
}

.login-separator::after {
    margin-left: 0.5rem;
}

.social-login-btn {
    width: 100%;
    padding: 0.875rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.social-login-btn:hover {
    border-color: #00A89C;
}

.social-login-btn img {
    width: 20px;
    height: 20px;
}

.login-terms {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #999;
    line-height: 1.5;
}

.login-terms a {
    color: #00A89C;
    text-decoration: none;
    font-weight: 600;
}

.login-terms a:hover {
    text-decoration: underline;
}

.login-powered-by {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.8125rem;
    color: #999;
    line-height: 1.5;
}

.cloudstrit-logo-link {
    display: inline-block;
    margin-bottom: 0.25rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.cloudstrit-logo-link:hover {
    opacity: 0.8;
}

.cloudstrit-logo {
    height: 24px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.login-powered-by-text {
    margin-top: 0.125rem;
}

.login-powered-by-text span {
    color: #999;
    margin-right: 0.25rem;
}

.login-powered-by-text a {
    color: #00A89C;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.login-powered-by-text a:hover {
    color: #008B7F;
    text-decoration: underline;
}

/* Right Section Content */
.login-promo-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.login-promo-logo {
    font-size: 12rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-promo-logo .logo-v {
    color: #ef407a;
}

.login-promo-logo .logo-number {
    color: rgba(255, 255, 255, 0.3);
}

.login-promo-logo .login-logo-img {
    max-width: 100%;
    max-height: 17rem;
    width: auto;
    height: auto;
    object-fit: contain;
}

.login-promo-tagline {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-promo-subtitle {
    font-size: 2rem;
    font-weight: 700;
}

/* Global Navigation */
.login-global-nav {
    position: absolute;
    top: 2rem;
    width: 100%;
    z-index: 100;
    padding: 0 2rem;
}

.login-global-nav-left {
    position: absolute;
    left: 2rem;
}

.login-global-nav-right {
    position: absolute;
    right: 2rem;
}

.language-selector {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    user-select: none;
}

.language-selector:hover {
    border-color: #00A89C;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.language-selector.active .language-dropdown {
    display: block;
}

.language-selector.active .ti-angle-down {
    transform: rotate(180deg);
}

.language-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
}

.language-option:hover {
    background-color: #f8f9fa;
}

.language-option.selected {
    background-color: rgba(0, 168, 156, 0.1);
    color: #00A89C;
    font-weight: 600;
}

.back-to-website-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-to-website-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 992px) {
    .login-page-wrapper {
        flex-direction: column;
    }
    
    .login-left-section,
    .login-right-section {
        flex: 1;
        min-height: 50vh;
    }
    
    .login-right-section {
        display: none; /* Hide on mobile or make it smaller */
    }
    
    .login-card {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }

    /* Two-column layout becomes single column on tablets */
    .register-form-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Reset card width on tablets */
    .register-card {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }
    
    .login-card-title {
        font-size: 1.5rem;
    }
    
    .login-global-nav {
        padding: 0 1rem;
    }
    
    .login-global-nav-left,
    .login-global-nav-right {
        position: static;
        margin-bottom: 1rem;
    }

    /* Ensure single column on mobile */
    .register-form-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Validation Error Styles */
.field-validation-error {
    color: #f44336;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.validation-summary-errors {
    background-color: #ffebee;
    border: 1px solid #f44336;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #f44336;
    font-size: 0.875rem;
    display: none; /* Hidden by default */
}

.validation-summary-errors:not(:empty),
.validation-summary-errors ul:not(:empty) {
    display: block; /* Show only when there's content */
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* Verification Code Styles */
.verification-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.9375rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.verification-code-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.verification-digit {
    width: 56px;
    height: 56px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    color: #212529;
}

.verification-digit:focus {
    outline: none;
    border-color: #00A89C;
    box-shadow: 0 0 0 3px rgba(0, 168, 156, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.verification-digit:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.countdown-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.countdown-text {
    color: #666;
    font-size: 0.875rem;
    margin: 0;
}

.countdown-text #countdown {
    color: #00A89C;
    font-weight: 600;
    font-size: 1rem;
}

.countdown-text.expired {
    color: #f44336;
    font-weight: 600;
}

.resend-container {
    text-align: center;
    margin-top: 1.5rem;
}

.resend-container p {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.resend-btn {
    background: none;
    border: none;
    color: #00A89C;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.2s ease;
}

.resend-btn:hover:not(:disabled) {
    color: #008B7F;
}

.resend-btn:disabled {
    color: #999;
    cursor: not-allowed;
    text-decoration: none;
}

#verify-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

#verify-btn:disabled:hover {
    background-color: #ccc;
    box-shadow: none;
}

@media (max-width: 576px) {
    .verification-digit {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .verification-code-container {
        gap: 0.5rem;
    }
}
