/**
 * Global Alert System Styles
 * Sağ üstte gösterilen, stack yapısında alert sistemi
 */

/* Container */
.global-alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

/* Alert Base Styles */
.global-alert {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    min-width: 320px;
    max-width: 400px;
}

.global-alert.show {
    opacity: 1;
    transform: translateX(0);
}

.global-alert.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Alert Content */
.global-alert-content {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
}

/* Alert Icon */
.global-alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-top: 2px;
}

.global-alert-icon i {
    display: block;
}

/* Alert Message */
.global-alert-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
    word-wrap: break-word;
}

/* Alert Close Button */
.global-alert-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999999;
    transition: color 0.2s ease;
    margin-top: 2px;
}

.global-alert-close:hover {
    color: #333333;
}

.global-alert-close i {
    font-size: 12px;
}

/* Progress Bar */
.global-alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.global-alert-progress-bar {
    height: 100%;
    width: 100%;
    background: currentColor;
    transform-origin: left;
    animation: progressBar 4000ms linear forwards;
}

@keyframes progressBar {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Success Alert */
.global-alert-success {
    border-left: 4px solid #28a745;
}

.global-alert-success .global-alert-icon {
    color: #28a745;
}

.global-alert-success .global-alert-progress-bar {
    color: #28a745;
}

/* Error Alert */
.global-alert-error {
    border-left: 4px solid #dc3545;
}

.global-alert-error .global-alert-icon {
    color: #dc3545;
}

.global-alert-error .global-alert-progress-bar {
    color: #dc3545;
}

/* Warning Alert */
.global-alert-warning {
    border-left: 4px solid #ffc107;
}

.global-alert-warning .global-alert-icon {
    color: #ffc107;
}

.global-alert-warning .global-alert-progress-bar {
    color: #ffc107;
}

/* Info Alert */
.global-alert-info {
    border-left: 4px solid #17a2b8;
}

.global-alert-info .global-alert-icon {
    color: #17a2b8;
}

.global-alert-info .global-alert-progress-bar {
    color: #17a2b8;
}

/* Responsive */
@media (max-width: 768px) {
    .global-alert-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .global-alert {
        min-width: auto;
        max-width: none;
    }
}

/* Dark Mode Support (opsiyonel) */
@media (prefers-color-scheme: dark) {
    .global-alert {
        background: #2d2d2d;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .global-alert-message {
        color: #e0e0e0;
    }

    .global-alert-close {
        color: #999999;
    }

    .global-alert-close:hover {
        color: #e0e0e0;
    }

    .global-alert-progress {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Animation Enhancements */
.global-alert {
    will-change: transform, opacity;
}

.global-alert-progress-bar {
    will-change: transform;
}

/* Accessibility */
.global-alert[role="alert"] {
    /* Screen reader için */
}

.global-alert-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}









