/**
 * RiskAss Login Page Styles
 * Microsoft 365 inspired design
 */

/* Full page styles for login */
body.riskass-login-page-body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #f3f2f1;
}

.riskass-login-page {
    min-height: 100vh;
    background: #f3f2f1;
    background-image: 
        linear-gradient(135deg, #faf9f8 0%, #edebe9 100%);
    background-attachment: fixed;
}

.riskass-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Login box */
.login-box {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    padding: 48px;
    width: 100%;
    max-width: 440px;
}

/* Logo */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    height: 40px;
    width: auto;
}

/* Titles */
.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #323130;
    margin: 0 0 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #605e5c;
    margin: 0 0 32px;
}

/* Form */
.login-form {
    margin: 0;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 8px;
}

/* Input group */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #605e5c;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.input-icon i {
    font-size: 16px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #605e5c;
    border-radius: 4px;
    font-size: 14px;
    color: #323130;
    background-color: #ffffff;
    transition: border-color 0.1s ease;
    box-sizing: border-box;
}

/* Specific padding for inputs with icons in login form */
.riskass-login-container .input-group .form-input {
    padding-left: 42px;
}

.form-input::placeholder {
    color: #a19f9d;
    opacity: 1;
}

.form-input:hover {
    border-color: #323130;
}

.form-input:focus {
    border-color: #0078d4;
    outline: none;
    box-shadow: 0 0 0 1px #0078d4;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #605e5c;
    cursor: pointer;
    padding: 8px;
    transition: color 0.1s ease;
}

.password-toggle:hover {
    color: #323130;
}

/* Form options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #323130;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-link {
    font-size: 14px;
    color: #0078d4;
    text-decoration: none;
    transition: color 0.1s ease;
    cursor: pointer;
}

.forgot-link:hover {
    color: #106ebe;
    text-decoration: underline;
}

/* Login button */
.btn-login {
    width: 100%;
    padding: 12px 24px;
    background-color: #0078d4;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.btn-login:hover {
    background-color: #106ebe;
}

.btn-login:active {
    background-color: #005a9e;
}

.btn-login:disabled {
    background-color: #a19f9d;
    cursor: not-allowed;
}

/* Messages */
.login-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.login-message.error {
    background-color: #fde7e9;
    color: #a80000;
    border: 1px solid #f1707b;
}

.login-message.success {
    background-color: #dff6dd;
    color: #107c10;
    border: 1px solid #54b054;
}

/* Form Links */
.form-links {
    margin-top: 24px;
    text-align: center;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #0078d4;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.back-to-login:hover {
    color: #106ebe;
    text-decoration: underline;
}

.back-to-login i {
    font-size: 12px;
}

/* Success message */
.login-message.success {
    background-color: #dff6dd;
    color: #107c10;
    border: 1px solid #54b054;
}

/* Footer */
.login-footer {
    margin-top: 32px;
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: #605e5c;
    margin: 0;
}

/* Loading state */
.loading .btn-login {
    position: relative;
    color: transparent;
}

.loading .btn-login::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .login-box {
        padding: 32px 24px;
    }
    
    .login-title {
        font-size: 20px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Hide WordPress admin bar on login page */
body.page-template-default #wpadminbar {
    display: none;
}

/* Full height for login page */
body.page-template-default.logged-in .riskass-login-container {
    min-height: calc(100vh - 32px);
}