/* LogonWindowTemplate1 Component Styles with Enhanced Animations */
.logon-window-template-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6), 0 0 30px rgba(102, 126, 234, 0.4);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation Classes */
.logon-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.logon-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.logon-fade-in-up-delay {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.logon-fade-in-up-delay-2 {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.logon-fade-in-up-delay-3 {
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.logon-fade-in-up-delay-4 {
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.logon-fade-in-up-delay-5 {
    animation: fadeInUp 0.6s ease-out 1.0s both;
}

.logon-fade-in-up-delay-6 {
    animation: fadeInUp 0.6s ease-out 1.2s both;
}

.logon-fade-in-up-delay-7 {
    animation: fadeInUp 0.6s ease-out 1.4s both;
}

.logon-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.logon-slide-in-right {
    animation: slideInRight 0.8s ease-out 0.3s both;
}

.logon-bounce-in {
    animation: bounceIn 1.0s ease-out 0.5s both;
}

.logon-shake {
    animation: shake 0.6s ease-in-out;
}

.logon-auth-failed {
    animation: shake 0.6s ease-in-out, glow 0.6s ease-in-out;
    border: 2px solid #ef4444 !important;
}

/* Form items staggered animation */
.logon-form-item-1 {
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.logon-form-item-2 {
    animation: fadeInUp 0.6s ease-out 1.0s both;
}

.logon-form-item-3 {
    animation: fadeInUp 0.6s ease-out 1.2s both;
}

/* Hover animations */
.logon-login-card {
    transition: all 0.3s ease;
}

.logon-avatar {
    transition: all 0.3s ease;
}

.logon-avatar:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Enhanced existing styles with animations */
.logon-navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    animation: fadeIn 0.8s ease-out;
}

.logon-nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.logon-nav-left {
    display: flex;
    align-items: center;
}

.logon-nav-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.logon-nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.logon-nav-link:hover {
    color: white;
    transform: translateY(-2px);
}

.logon-nav-right {
    color: rgba(255, 255, 255, 0.9);
}

.logon-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 80px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    gap: 4rem;
    align-items: center;
}

.logon-login-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logon-login-card {
    background: white;
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: all 0.3s ease;
}

.logon-login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.logon-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.logon-welcome-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.logon-welcome-subtitle {
    color: #718096;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.logon-form-container {
    text-align: left;
}

.logon-form-group {
    margin-bottom: 1.5rem;
}

.logon-form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.logon-form-label i {
    margin-right: 0.5rem;
    color: #667eea;
    width: 16px;
    transition: transform 0.3s ease;
}

.logon-form-group:hover .logon-form-label i {
    transform: scale(1.1);
}

.logon-login-form {
    margin-bottom: 1.5rem;
}

.logon-login-toolbar {
    margin-bottom: 1rem;
}

.logon-separator {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.logon-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    animation: fadeIn 0.6s ease-out;
}

.logon-separator span {
    background: white;
    padding: 0 1rem;
    color: #718096;
    font-size: 0.875rem;
}

.logon-external-auth {
    margin-bottom: 1.5rem;
}

.logon-back-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.logon-link, .logon-help-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logon-link:hover, .logon-help-link:hover {
    color: #764ba2;
    transform: translateY(-1px);
}

.logon-info-section {
    color: white;
    padding: 2rem;
}

.logon-info-content {
    max-width: 400px;
}

.logon-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.logon-info-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.logon-info-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
}

/* Enhanced Forms List Styles */
.logon-forms-list {
    margin-bottom: 2rem;
}

.logon-form-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.logon-form-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.logon-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.logon-form-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    margin-right: 0.75rem;
    transition: color 0.3s ease;
}

.logon-form-item:hover .logon-form-title {
    color: #f0f0f0;
}

.logon-form-item .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.logon-form-item:hover .badge {
    transform: scale(1.05);
}

.logon-form-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    margin-top: 0;
    transition: color 0.3s ease;
}

.logon-form-item:hover .logon-form-description {
    color: rgba(255, 255, 255, 0.9);
}

.logon-form-actions {
    text-align: left;
}

.logon-btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.logon-btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.15);
}

.logon-more-forms {
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
}

.logon-more-forms p {
    margin: 0;
    font-size: 0.85rem;
}

.logon-forms-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.logon-forms-placeholder:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.logon-placeholder-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.logon-forms-placeholder h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.logon-forms-placeholder p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.logon-view-forms-btn {
    text-align: center;
}

.logon-btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.logon-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.1);
}

.logon-language-switcher {
    margin-bottom: 1rem;
}

/* Enhanced XAF Component Styling */
.logon-login-form .dx-textbox .dx-texteditor-input {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
    width: 100%;
}

.logon-login-form .dx-textbox.dx-state-focused .dx-texteditor-input {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
    transform: translateY(-1px);
}

.logon-login-form .form-control {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
    width: 100%;
}

.logon-login-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
    outline: none;
    transform: translateY(-1px);
}

.logon-login-toolbar .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    width: 100%;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logon-login-toolbar .btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.logon-login-toolbar .btn-primary:active {
    transform: translateY(0);
}

.logon-login-toolbar .btn {
    background: #007bff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    width: 100%;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logon-login-toolbar .btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.logon-login-toolbar .btn:active {
    transform: translateY(0);
}

/* Loading state animation */
.logon-login-toolbar .btn.loading {
    color: transparent;
}

.logon-login-toolbar .btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Development/Debug buttons styling */
.logon-debug-buttons {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.logon-debug-buttons .btn {
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    display: inline-block;
    width: auto;
    transition: all 0.3s ease;
}

.logon-debug-buttons .btn:hover {
    transform: translateY(-1px);
}

.logon-debug-buttons .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
}

.logon-debug-buttons .btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.logon-debug-buttons .btn-success {
    background: #28a745;
    border-color: #28a745;
}

.logon-debug-buttons .btn-info {
    background: #17a2b8;
    border-color: #17a2b8;
}

.logon-debug-buttons .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

/* Responsive Design with animations */
@media (max-width: 768px) {
    .logon-main-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .logon-nav-content {
        padding: 0 1rem;
    }
    
    .logon-nav-left .logon-nav-link {
        display: none;
    }
    
    .logon-login-card {
        padding: 2rem 1.5rem;
    }
    
    .logon-info-section {
        order: -1;
        padding: 1rem;
    }
    
    .logon-back-link {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logon-form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .logon-form-title {
        margin-right: 0;
    }
    
    .logon-forms-list {
        margin-bottom: 1.5rem;
    }
    
    .logon-form-item {
        padding: 1.25rem;
    }
    
    /* Reduce animation complexity on mobile for performance */
    .logon-form-item:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .logon-placeholder-icon {
        animation-duration: 4s;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .logon-placeholder-icon {
        animation: none;
    }
}

/* Performance optimizations for animations */
.logon-login-card,
.logon-form-item,
.logon-avatar,
.logon-btn-primary,
.logon-btn-outline {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Hardware acceleration for smooth animations */
.logon-shake,
.logon-auth-failed,
.logon-bounce-in,
.logon-fade-in-up,
.logon-slide-in-left,
.logon-slide-in-right {
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}