/* Login and Registration Pages Styles */

/* Login Page */
.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.login-page .container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.login-header p {
    color: var(--text-color);
    opacity: 0.7;
    margin: 0;
    font-size: 0.95rem;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 0;
}

.login-form .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.login-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--accent-color-1);
    box-shadow: 0 0 0 3px rgba(106, 84, 46, 0.1);
}

.login-form .form-control.error {
    border-color: #dc3545;
}

.login-form .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-form .form-check input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.login-form .form-check label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.9rem;
}

.login-form .forgot-password-link {
    color: var(--accent-color-1);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.login-form .forgot-password-link:hover {
    color: var(--accent-color-2);
    text-decoration: underline;
}

.login-form .btn,
.login-form button.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.login-form .btn.btn-large {
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
}

.login-form .btn-primary {
    background: var(--accent-color-1);
    color: white;
}

.login-form .btn-primary:hover {
    background: var(--accent-color-2);
    color: white;
}

.login-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-form .btn-secondary {
    background: var(--hover-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.login-form .btn-secondary:hover {
    background: var(--border-color);
}

/* Login Messages */
.login-message {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.login-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.login-message.login-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-message.login-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-message.login-info {
    background: var(--hover-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.login-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.login-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Login Footer */
.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.login-footer p {
    margin: 0;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.95rem;
}

.login-footer a {
    color: var(--accent-color-1);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: var(--accent-color-2);
    text-decoration: underline;
}

/* Registration Page */
.registration-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.registration-page .container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.registration-wrapper {
    width: 100%;
    max-width: 550px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.registration-header {
    text-align: center;
    margin-bottom: 2rem;
}

.registration-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.registration-header p {
    color: var(--text-color);
    opacity: 0.7;
    margin: 0;
    font-size: 0.95rem;
}

/* Registration Form */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.registration-form .form-group {
    margin-bottom: 0;
}

.registration-form .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.registration-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.registration-form .form-control:focus {
    outline: none;
    border-color: var(--accent-color-1);
    box-shadow: 0 0 0 3px rgba(106, 84, 46, 0.1);
}

.registration-form .form-control.error {
    border-color: #dc3545;
}

.registration-form .form-help {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.5;
}

.registration-form .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.registration-form .form-check input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

.registration-form .form-check label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.5;
}

.registration-form .form-check label a {
    color: var(--accent-color-1);
    text-decoration: none;
    transition: color 0.2s ease;
}

.registration-form .form-check label a:hover {
    color: var(--accent-color-2);
    text-decoration: underline;
}

.registration-form .btn,
.registration-form button.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-sizing: border-box;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.registration-form .btn.btn-large {
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
}

.registration-form .btn-primary {
    background: var(--accent-color-1);
    color: white;
}

.registration-form .btn-primary:hover {
    background: var(--accent-color-2);
    color: white;
}

.registration-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.registration-form .btn-secondary {
    background: var(--hover-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.registration-form .btn-secondary:hover {
    background: var(--border-color);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
}

.password-strength.weak {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.password-strength.medium {
    display: block;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.password-strength.strong {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.password-strength .strength-label {
    display: block;
}

/* Registration Messages */
.registration-message {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.registration-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.registration-message.registration-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.registration-message.registration-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.registration-message.registration-info {
    background: var(--hover-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Registration Footer */
.registration-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.registration-footer p {
    margin: 0;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.95rem;
}

.registration-footer a {
    color: var(--accent-color-1);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.registration-footer a:hover {
    color: var(--accent-color-2);
    text-decoration: underline;
}

/* Field Error Messages */
.field-error {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.field-error.show {
    display: block;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 4px;
}

.toggle-password:hover,
.toggle-password:focus {
    color: var(--accent-color-1);
    opacity: 1;
    background: var(--hover-bg);
    outline: none;
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

.toggle-password i {
    font-size: 1.1rem;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 968px) {
    /* CRITICAL: Override body margins on login/registration pages for mobile */
    /* This ensures the header can be full width and sticky */
    body.page-template-page-login,
    body.page-template-page-register,
    body.page-template-page-login-php,
    body.page-template-page-register-php {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* Override any sidebar-related margins on mobile */
    .main-content-wrapper .login-page,
    .main-content-wrapper .registration-page,
    .login-page,
    .registration-page {
        padding: 1rem;
        min-height: calc(100vh - 150px);
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }
    
    .main-content-wrapper .login-page .container,
    .main-content-wrapper .registration-page .container,
    .login-page .container,
    .registration-page .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .login-wrapper,
    .registration-wrapper {
        padding: 2rem 1.5rem;
        border-radius: 8px;
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .login-header h1,
    .registration-header h1 {
        font-size: 1.75rem;
    }
    
    .login-actions {
        flex-direction: column;
    }
    
    .login-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-content-wrapper .login-page,
    .main-content-wrapper .registration-page,
    .login-page,
    .registration-page {
        padding: 0.75rem;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .main-content-wrapper .login-page .container,
    .main-content-wrapper .registration-page .container,
    .login-page .container,
    .registration-page .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .login-wrapper,
    .registration-wrapper {
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .login-header h1,
    .registration-header h1 {
        font-size: 1.5rem;
    }
}




