/* R10.web.tr - Enhanced Notification Styles */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    overflow: hidden;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 16px;
    position: relative;
}

.notification-icon {
    font-size: 24px;
    margin-right: 12px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.notification-close:hover {
    color: #333;
}

/* Notification types */
.notification-success {
    border-left: 4px solid #28a745;
}

.notification-success .notification-icon {
    color: #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-error .notification-icon {
    color: #dc3545;
}

.notification-warning {
    border-left: 4px solid #ffc107;
}

.notification-warning .notification-icon {
    color: #ffc107;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

.notification-info .notification-icon {
    color: #17a2b8;
}

/* Form validation styles */
.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.is-valid {
    border-color: #28a745 !important;
    background-color: #f0fff4 !important;
}

.invalid-feedback {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #dc3545;
}

/* Lazy loading images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 0.8s linear infinite;
}

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

/* Button loading state */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.6s linear infinite;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Smooth animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .notification {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
        top: 10px;
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification {
        transform: translateY(-100px);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #2d2d2d;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .notification-message {
        color: #e0e0e0;
    }
    
    .notification-close {
        color: #999;
    }
    
    .notification-close:hover {
        color: #fff;
    }
}

/* Performance optimization hints */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    content-visibility: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
