/*
 * Name: Login Modal Styles
 * Datei: assets/css/login-modal.css
 *
 * Autor: Call Me Techie
 * Webseite: CallMeTechie.de
 * Copyright: © 2025 Call Me Techie
 */

/* Login Modal Overlay */
.login-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    will-change: opacity;
}

.login-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Blur effect for page content when modal is active */
body.login-required .container,
body.login-required .loading-overlay,
body.login-required .footer {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

/* Prevent scrolling when modal is active */
body.login-required {
    overflow: hidden;
}

/* Login Modal Container */
.login-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 420px;
    padding: 0;
    position: relative;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.login-modal-overlay.active .login-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Modal Header */
.login-modal-header {
    text-align: center;
    padding: 40px 40px 30px;
    border-radius: 16px 16px 0 0;
}

.login-modal-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal-logo img {
    width: 120px;
    height: 120px;
}

.login-modal-title {
    color: white;
    font-size: 2em;
    margin: 0 0 10px;
    font-weight: 700;
}

.login-modal-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    margin: 0;
    font-weight: 400;
}

/* Modal Body */
.login-modal-body {
    background: white;
    padding: 40px;
    border-radius: 0 0 16px 16px;
}

/* Error Message */
.login-modal-error {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
    border: 1px solid #fcc;
    display: none;
}

.login-modal-error.visible {
    display: block;
    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); }
}

/* Form Group */
.login-modal-form-group {
    margin-bottom: 20px;
}

.login-modal-label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.login-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.login-modal-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Submit Button */
.login-modal-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.login-modal-submit:active {
    transform: translateY(0);
}

.login-modal-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.login-modal-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.login-modal-submit.loading .login-modal-spinner {
    display: block;
}

.login-modal-submit.loading .login-modal-submit-text {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.login-modal-footer {
    text-align: center;
    padding: 20px 40px 30px;
    background: white;
    border-radius: 0 0 16px 16px;
    margin-top: -10px;
}

.login-modal-footer p {
    color: #666;
    font-size: 0.85em;
    margin: 0;
}

.login-modal-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.login-modal-footer a:hover {
    text-decoration: underline;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .login-modal-body,
    .login-modal-footer {
        background: #1e1e1e;
    }
    
    .login-modal-label {
        color: #e0e0e0;
    }
    
    .login-modal-input {
        background: #2a2a2a;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .login-modal-input:focus {
        border-color: #667eea;
        background: #333;
    }
    
    .login-modal-footer p {
        color: #999;
    }
}

/* Responsive */
@media screen and (max-width: 480px) {
    .login-modal {
        width: 95%;
        max-width: none;
    }
    
    .login-modal-header {
        padding: 30px 20px 20px;
    }
    
    .login-modal-body {
        padding: 30px 20px;
    }
    
    .login-modal-footer {
        padding: 15px 20px 25px;
    }
    
    .login-modal-title {
        font-size: 1.5em;
    }
}
