/**
 * Lock Screen Styles
 * Optimized CSS untuk lock screen dengan minimal overhead
 */

/* Lock Screen Modal */
#lock-screen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#lock-screen-modal.show {
    opacity: 1;
}

#lock-screen-modal.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.lock-screen-content {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#lock-screen-modal.show .lock-screen-content {
    transform: scale(1);
}

.lock-screen-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.lock-screen-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.lock-screen-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

/* PIN Input Container */
.lock-pin-container {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.lock-pin-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    outline: none;
}

.lock-pin-input:focus {
    border-color: #0d6efd;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    transform: scale(1.05);
}

.lock-pin-input:invalid {
    border-color: #dc3545;
}

/* PIN Error Message */
#lock-pin-error {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #f8d7da;
    border-radius: 6px;
    border: 1px solid #f5c2c7;
}

/* Warning Toast */
#lock-screen-warning {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #ffc107;
    color: #000;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99998;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

#lock-screen-warning.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#lock-screen-warning i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 576px) {
    .lock-screen-content {
        padding: 2rem 1.5rem;
    }
    
    .lock-pin-input {
        width: 45px;
        height: 55px;
        font-size: 1.25rem;
    }
    
    .lock-pin-container {
        gap: 0.5rem;
    }
    
    .lock-screen-title {
        font-size: 1.25rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lock-screen-content {
        background: #212529;
        color: #fff;
    }
    
    .lock-screen-title {
        color: #fff;
    }
    
    .lock-screen-subtitle {
        color: #adb5bd;
    }
    
    .lock-pin-input {
        background: #343a40;
        border-color: #495057;
        color: #fff;
    }
    
    .lock-pin-input:focus {
        background: #495057;
        border-color: #0d6efd;
    }
}

