/**
 * TIGOWEB Master - Login Page Styles
 *
 * Modern, responsive login page styling.
 *
 * @package Tigoweb_Plugin_Master
 * @since 1.0.0
 */

/* Base Styles */
body.login.tigoweb-branded {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Login Form Card */
body.login.tigoweb-branded #login {
    width: 360px;
    padding: 8% 0 0;
    margin: auto;
}

body.login.tigoweb-branded #loginform,
body.login.tigoweb-branded #registerform,
body.login.tigoweb-branded #lostpasswordform {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 30px 24px;
    margin-top: 20px;
}

/* Logo */
body.login.tigoweb-branded h1 a {
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    display: block;
    width: 100%;
    height: 84px;
    text-indent: -9999px;
    overflow: hidden;
    outline: none;
}

/* Form Labels */
body.login.tigoweb-branded label {
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
}

/* Form Inputs */
body.login.tigoweb-branded input[type="text"],
body.login.tigoweb-branded input[type="password"],
body.login.tigoweb-branded input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: none;
    height: auto;
}

body.login.tigoweb-branded input[type="text"]:focus,
body.login.tigoweb-branded input[type="password"]:focus,
body.login.tigoweb-branded input[type="email"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--tigoweb-primary, #2271b1);
}

/* Submit Button */
body.login.tigoweb-branded .wp-core-ui .button-primary {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
    transition: all 0.2s ease;
    height: auto;
    line-height: 1.4;
}

body.login.tigoweb-branded .wp-core-ui .button-primary:hover,
body.login.tigoweb-branded .wp-core-ui .button-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
}

body.login.tigoweb-branded .wp-core-ui .button-primary:active {
    transform: translateY(0);
}

/* Remember Me */
body.login.tigoweb-branded .forgetmenot {
    margin-bottom: 16px;
}

body.login.tigoweb-branded .forgetmenot label {
    font-size: 13px;
    color: #646970;
}

/* Submit Row */
body.login.tigoweb-branded .submit {
    margin-top: 20px;
}

/* Links */
body.login.tigoweb-branded #nav,
body.login.tigoweb-branded #backtoblog {
    text-align: center;
    margin: 20px 0 0;
    padding: 0;
}

body.login.tigoweb-branded #nav a,
body.login.tigoweb-branded #backtoblog a {
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

body.login.tigoweb-branded #nav a:hover,
body.login.tigoweb-branded #backtoblog a:hover {
    text-decoration: underline;
}

/* Messages */
body.login.tigoweb-branded .message,
body.login.tigoweb-branded .success {
    border-radius: 8px;
    border-left-width: 4px;
    margin: 0 0 16px;
    padding: 12px 16px;
    box-shadow: none;
    background: #fff;
}

/* Errors */
body.login.tigoweb-branded #login_error {
    border-radius: 8px;
    border-left: 4px solid #d63638;
    margin: 0 0 16px;
    padding: 12px 16px;
    background: #fff;
    box-shadow: none;
}

/* Privacy Policy Link */
body.login.tigoweb-branded .privacy-policy-page-link {
    text-align: center;
    margin-top: 20px;
}

body.login.tigoweb-branded .privacy-policy-page-link a {
    font-size: 12px;
    color: #646970;
}

/* TIGOWEB Mark */
.tigoweb-mark {
    position: fixed;
    padding: 10px;
    z-index: 100;
}

.tigoweb-mark-bottom-left {
    bottom: 10px;
    left: 10px;
}

.tigoweb-mark-bottom-right {
    bottom: 10px;
    right: 10px;
}

.tigoweb-mark-top-left {
    top: 10px;
    left: 10px;
}

.tigoweb-mark-top-right {
    top: 10px;
    right: 10px;
}

.tigoweb-mark a {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.4);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.tigoweb-mark a:hover {
    color: rgba(0, 0, 0, 0.7);
}

.tigoweb-mark svg {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

.tigoweb-mark a:hover svg {
    opacity: 0.8;
}

/* Language Switcher */
body.login.tigoweb-branded .language-switcher {
    margin-top: 20px;
    text-align: center;
}

body.login.tigoweb-branded .language-switcher select {
    border-radius: 6px;
    padding: 6px 12px;
}

/* Responsive */
@media screen and (max-width: 480px) {
    body.login.tigoweb-branded #login {
        width: 100%;
        padding: 5% 20px 0;
    }

    body.login.tigoweb-branded #loginform,
    body.login.tigoweb-branded #registerform,
    body.login.tigoweb-branded #lostpasswordform {
        padding: 24px 20px;
    }

    body.login.tigoweb-branded h1 a {
        height: 60px;
    }
}

/* Animation */
@keyframes tigoweb-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.login.tigoweb-branded #login {
    animation: tigoweb-fadeIn 0.4s ease-out;
}

/* Password Strength Indicator */
body.login.tigoweb-branded #pass-strength-result {
    border-radius: 4px;
    margin-top: 10px;
    padding: 8px 12px;
    text-align: center;
    font-weight: 500;
}

/* Show/Hide Password Toggle */
body.login.tigoweb-branded .wp-pwd {
    position: relative;
}

body.login.tigoweb-branded .button.wp-hide-pw {
    position: absolute;
    right: 0;
    top: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 10px 12px;
    color: #646970;
}

body.login.tigoweb-branded .button.wp-hide-pw:hover {
    background: transparent;
    color: #1d2327;
}

/* Interim Login */
body.login.tigoweb-branded.interim-login #login {
    padding-top: 0;
}

/* User Profile Picture */
body.login.tigoweb-branded .login-action-confirm_admin_email #login {
    width: 460px;
}

/* Dark Mode Support (if user prefers) */
@media (prefers-color-scheme: dark) {
    body.login.tigoweb-branded {
        /* Keep light mode for login by default */
    }
}

/* Print Styles */
@media print {
    body.login.tigoweb-branded {
        background: white !important;
    }

    body.login.tigoweb-branded #loginform {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .tigoweb-mark {
        display: none;
    }
}

