/**
 * Portal Login Page Styles
 * 
 * @package YOOPixel Portal
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* Login Page Styles */
body.yooportal-login-page {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url('../images/background.jpg') center center no-repeat !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    overflow: hidden !important;
}

.yooportal-login {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: url('../images/background.jpg') center center no-repeat !important;
    background-size: cover !important;
    z-index: 99999 !important;
    overflow: hidden !important;
    font-family: 'Montserrat', sans-serif !important;
}

.yooportal-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1;
}

.login-container {
    display: flex !important;
    max-width: 900px !important;
    width: 90% !important;
    max-height: 85vh !important;
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4) !important;
    overflow: hidden !important;
    animation: slideUp 0.4s ease !important;
    position: relative !important;
    z-index: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Side - Image */
.login-image {
    flex: 1;
    background: url('../images/background.jpg') center center no-repeat;
    background-size: cover;
    position: relative;
    display: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .login-image {
        display: block;
    }
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.overlay-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.15);
    padding: 40px 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin: 40px;
}

.overlay-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.overlay-content p {
    font-size: 16px;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Right Side - Form */
.login-form-section {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 85vh;
}

@media (max-width: 767px) {
    .login-form-section {
        padding: 30px 25px;
    }
}

@media (max-height: 700px) {
    .login-form-section {
        padding: 25px 30px;
        justify-content: flex-start;
    }
}

/* Logo */
.login-logo {
    text-align: center;
    margin: 0 auto 40px;
    display: flex;
    justify-content: center;
}

.login-logo img {
    max-width: 160px;
    height: auto;
}

@media (max-height: 700px) {
    .login-logo {
        margin-bottom: 30px;
    }
    
    .login-logo img {
        max-width: 180px;
    }
}

/* Form */
.login-form h1 {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    text-align: center;
}

.form-subtitle {
    font-size: 12px;
    color: #718096;
    margin-bottom: 20px;
    text-align: center;
}

@media (max-height: 700px) {
    .login-form h1 {
        font-size: 22px;
        margin-bottom: 5px;
    }
    
    .form-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }
}

.form-group {
    margin-bottom: 18px;
}

@media (max-height: 700px) {
    .form-group {
        margin-bottom: 15px;
    }
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
}

.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
}

@media (max-height: 700px) {
    .form-group input[type="email"],
    .form-group input[type="password"] {
        padding: 10px 12px;
        font-size: 13px;
    }
}

.form-group input:focus {
    outline: none;
    border-color: #faa61a;
    box-shadow: 0 0 0 3px rgba(250, 166, 26, 0.1);
}

/* Form Row */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

@media (max-height: 700px) {
    .form-row {
        margin-bottom: 15px;
    }
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

/* Login Button */
.btn {
    width: 100%;
    padding: 14px;
    background: #FAA61A;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: #e89610;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(250, 166, 26, 0.3);
}

.btn:disabled {
    background: #ccc;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Message Box */
.login-message {
    margin-top: 15px;
}

.login-message .success {
    padding: 12px;
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    font-size: 14px;
}

.login-message .error {
    padding: 12px;
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
    border-radius: 8px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 767px) {
    .yooportal-login {
        padding: 0 !important;
    }
    
    .login-container {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    
    .login-form-section {
        max-height: 100vh;
    }
}

@media (max-width: 480px) {
    .login-form-section {
        padding: 25px 20px;
    }
    
    .login-logo img {
        max-width: 160px;
    }
    
    .login-form h1 {
        font-size: 20px;
    }
    
    .form-subtitle {
        font-size: 12px;
    }
}

@media (max-height: 600px) {
    .login-container {
        max-height: 100vh !important;
    }
    
    .login-form-section {
        padding: 20px 30px;
    }
    
    .login-logo {
        margin-bottom: 15px;
    }
    
    .login-logo img {
        max-width: 120px;
    }
    
    .login-form h1 {
        font-size: 20px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-row {
        margin-bottom: 12px;
    }
}

/* Forgot Password Styles */
.link-btn {
    background: none;
    border: none;
    color: #FAA61A;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.link-btn:hover:not(:disabled) {
    color: #e89610;
    background: rgba(250, 166, 26, 0.1);
}

.link-btn:disabled {
    color: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.link-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* Code Inputs */
.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.code-input:focus {
    outline: none;
    border-color: #FAA61A;
}

/* Password Strength Meter */
.password-strength-meter {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    background: #ef4444;
}

.password-strength-bar.medium {
    background: #f59e0b;
}

.password-strength-bar.strong {
    background: #10b981;
}

.password-strength-bar.very-strong {
    background: #059669;
}

.password-strength-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #718096;
}

/* Button Loader */
.btn-loader {
    display: none;
}

.btn-loader .dashicons {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Form Footer */
.form-footer {
    margin-top: 20px;
    text-align: center;
}

/* Toast Message */
.yoo-admin-toast-message {
    position: fixed;
    top: 32px;
    right: 32px;
    z-index: 999999;
    padding: 16px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #065f46;
    min-width: 300px;
    max-width: 500px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    font-family: 'Montserrat', sans-serif;
}

.yoo-admin-toast-message.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.yoo-admin-toast-message .dashicons {
    flex-shrink: 0;
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #10b981;
}

.yoo-admin-toast-message .dashicons-warning {
    color: #ef4444;
}

.yoo-admin-toast-message.error {
    color: #dc2626;
}

.yoo-admin-toast-message .yoo-admin-toast-text {
    flex: 1;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .yoo-admin-toast-message {
        top: 16px;
        right: 16px;
        min-width: 280px;
    }
}
