/**
 * Universal Authentication Styles
 * Liquid glass design matching the KE aesthetic
 */

/* Modal Overlay */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-modal.fade-out {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Modal Content */
.auth-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 1px rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(255, 255, 255, 0.5);
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header i {
    font-size: 48px;
    color: #007aff;
    margin-bottom: 15px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.auth-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Employee Select Container */
.employee-select-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.employee-select-container label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.employee-select-container label i {
    color: #007aff;
}

.employee-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid rgba(0, 122, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.2s ease;
    cursor: pointer;
}

.employee-select:focus {
    outline: none;
    border-color: #007aff;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.employee-select option {
    padding: 10px;
}

/* PIN Input Container */
.pin-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pin-input-container label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pin-input-container label i {
    color: #007aff;
}

.pin-inputs {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Individual PIN Input */
.pin-input {
    width: 60px;
    height: 70px;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    border: 2px solid rgba(0, 122, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    transition: all 0.2s ease;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.pin-input:focus {
    outline: none;
    border-color: #007aff;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    transform: scale(1.05);
}

.pin-input::-webkit-inner-spin-button,
.pin-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Error Message */
.auth-error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: #ff3b30;
    font-size: 14px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Submit Button */
.auth-submit-btn {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.auth-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-submit-btn i {
    font-size: 16px;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-footer small {
    color: #999;
    font-size: 12px;
}

/* Shake Animation (for errors) */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease;
}

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 480px) {
    .auth-modal-content {
        padding: 30px 20px;
    }

    .auth-header h2 {
        font-size: 24px;
    }

    .pin-input-container {
        gap: 10px;
    }

    .pin-input {
        width: 50px;
        height: 60px;
        font-size: 28px;
    }
}
