/**
 * Master Slot Admin - Login Page CSS
 */

/* Login Page Specific Styles */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Login Box Container */
.login-box {
    width: 380px;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Logo Area */
.login-logo {
    margin-bottom: 25px;
    text-align: center;
}

.login-logo a {
    color: #ffffff;
    font-size: 32px;
    font-weight: 400;
    text-decoration: none;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.login-logo b {
    font-weight: 700;
    color: #ffd700;
}

/* Login Card */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.login-card-body {
    padding: 40px 35px;
}

.login-box-msg {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 400;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.input-group:focus-within {
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.form-control {
    border: 1px solid #e0e0e0;
    border-right: none;
    height: 45px;
    font-size: 14px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: none;
    outline: none;
}

.input-group-append .input-group-text {
    background: white;
    border: 1px solid #e0e0e0;
    border-left: none;
    color: #667eea;
    padding: 0 15px;
}

.input-group-text i {
    font-size: 16px;
}

/* Input placeholder styling */
.form-control::placeholder {
    color: #aaa;
    font-size: 13px;
    opacity: 0.7;
}

/* Remember Me Checkbox */
.icheck-primary {
    margin: 0;
    padding-left: 25px;
    position: relative;
}

.icheck-primary input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.icheck-primary label {
    color: #666;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    padding-left: 5px;
}

.icheck-primary label::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid #667eea;
    border-radius: 4px;
    background: white;
    transition: all 0.2s ease;
}

.icheck-primary input[type="checkbox"]:checked + label::before {
    background: #667eea;
    border-color: #667eea;
}

.icheck-primary input[type="checkbox"]:checked + label::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: -22px;
    top: 2px;
    color: white;
    font-size: 12px;
}

.icheck-primary input[type="checkbox"]:focus + label::before {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Login Button */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    height: 45px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Alert Messages */
.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    font-size: 14px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: linear-gradient(135deg, #f56565 0%, #ed64a6 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #48bb78 0%, #38b2ac 100%);
    color: white;
}

.alert .close {
    color: white;
    opacity: 0.8;
    text-shadow: none;
}

.alert .close:hover {
    opacity: 1;
}

/* Forgot Password Link */
.mb-1 {
    margin-top: 20px;
    text-align: center;
}

.mb-1 a {
    color: #667eea;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.mb-1 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #667eea;
    transition: width 0.3s ease;
}

.mb-1 a:hover {
    color: #764ba2;
}

.mb-1 a:hover::after {
    width: 100%;
}

/* Footer Text */
hr {
    margin: 25px 0 15px;
    border-color: #e0e0e0;
}

.text-muted {
    color: #999 !important;
    font-size: 12px;
}

/* Error State */
.is-invalid {
    border-color: #f56565 !important;
}

.is-invalid + .input-group-append .input-group-text {
    border-color: #f56565 !important;
    color: #f56565 !important;
}

.invalid-feedback {
    color: #f56565;
    font-size: 12px;
    margin-top: 5px;
    padding-left: 15px;
    display: block;
}

/* Loading State */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-box {
        width: 90%;
        margin: 20px auto;
    }
    
    .login-card-body {
        padding: 30px 20px;
    }
    
    .login-logo a {
        font-size: 28px;
    }
    
    .btn-primary {
        height: 40px;
        font-size: 13px;
    }
}

/* Custom Checkbox Styling for IE */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .icheck-primary input[type="checkbox"] {
        opacity: 1;
        position: static;
        width: auto;
        height: auto;
    }
    
    .icheck-primary label::before,
    .icheck-primary label::after {
        display: none;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .login-page {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }
    
    .card {
        background: rgba(45, 55, 72, 0.95);
    }
    
    .login-card-body {
        color: #e2e8f0;
    }
    
    .login-box-msg {
        color: #a0aec0;
    }
    
    .form-control {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .input-group-append .input-group-text {
        background: #2d3748;
        border-color: #4a5568;
        color: #a0aec0;
    }
    
    .icheck-primary label {
        color: #a0aec0;
    }
    
    .icheck-primary label::before {
        background: #2d3748;
    }
}

/* Additional Animations */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Password Strength Meter (optional - can be used later) */
.password-strength {
    height: 5px;
    margin-top: 10px;
    border-radius: 3px;
    background: #e0e0e0;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-weak {
    background: #f56565;
    width: 33.33%;
}

.strength-medium {
    background: #f6ad55;
    width: 66.66%;
}

.strength-strong {
    background: #48bb78;
    width: 100%;
}

/* Social Login Buttons (if needed later) */
.social-login-buttons {
    margin-top: 25px;
    text-align: center;
}

.social-login-buttons .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    line-height: 40px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.social-login-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-google {
    background: #db4437;
    color: white;
}

.btn-facebook {
    background: #4267B2;
    color: white;
}

.btn-twitter {
    background: #1DA1F2;
    color: white;
}

/* Language Selector (if needed) */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

.language-selector select {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 5px 25px 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 20px;
}

.language-selector select option {
    background: white;
    color: #333;
}

/* Version Tag */
.version-tag {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    z-index: 2;
}

/* Loading Overlay (for AJAX requests) */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .login-page {
        background: white;
    }
    
    .login-box {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .btn-primary {
        background: #f0f0f0;
        color: black;
        border: 1px solid #ddd;
    }
}