/* SkillExchange Alert System Styles */

.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.skill-alert {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid #e5e7eb;
    max-width: 100%;
}

.skill-alert.skill-alert-show {
    opacity: 1;
    transform: translateX(0);
}

.skill-alert.skill-alert-hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Alert Types */
.skill-alert-success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.skill-alert-error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fef2f2 100%);
}

.skill-alert-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);
}

.skill-alert-info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
}

.skill-alert-loading {
    border-left-color: #8b5cf6;
    background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%);
}

/* Alert Content */
.skill-alert-content {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    position: relative;
}

.skill-alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.skill-alert-success .skill-alert-icon {
    color: #10b981;
}

.skill-alert-error .skill-alert-icon {
    color: #ef4444;
}

.skill-alert-warning .skill-alert-icon {
    color: #f59e0b;
}

.skill-alert-info .skill-alert-icon {
    color: #3b82f6;
}

.skill-alert-loading .skill-alert-icon {
    color: #8b5cf6;
}

.skill-alert-text {
    flex: 1;
    min-width: 0;
}

.skill-alert-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.4;
}

.skill-alert-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    word-wrap: break-word;
}

.skill-alert-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.skill-alert-close:hover {
    color: #6b7280;
}

.skill-alert-action {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.skill-alert-success .skill-alert-action {
    color: #10b981;
    border-color: #10b981;
}

.skill-alert-success .skill-alert-action:hover {
    background: #10b981;
    color: white;
}

.skill-alert-error .skill-alert-action {
    color: #ef4444;
    border-color: #ef4444;
}

.skill-alert-error .skill-alert-action:hover {
    background: #ef4444;
    color: white;
}

.skill-alert-warning .skill-alert-action {
    color: #f59e0b;
    border-color: #f59e0b;
}

.skill-alert-warning .skill-alert-action:hover {
    background: #f59e0b;
    color: white;
}

.skill-alert-info .skill-alert-action {
    color: #3b82f6;
    border-color: #3b82f6;
}

.skill-alert-info .skill-alert-action:hover {
    background: #3b82f6;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .alert-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .skill-alert {
        margin-bottom: 8px;
    }
    
    .skill-alert-content {
        padding: 12px;
    }
    
    .skill-alert-title {
        font-size: 13px;
    }
    
    .skill-alert-message {
        font-size: 12px;
    }
    
    .skill-alert-action {
        margin-left: 8px;
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Animation for loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Progress bar for timed alerts */
.skill-alert::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    border-radius: 0 0 12px 12px;
    animation: alert-progress linear;
}

.skill-alert-success::after {
    background: #10b981;
    animation-duration: 5s;
}

.skill-alert-error::after {
    background: #ef4444;
    animation-duration: 8s;
}

.skill-alert-warning::after {
    background: #f59e0b;
    animation-duration: 5s;
}

.skill-alert-info::after {
    background: #3b82f6;
    animation-duration: 5s;
}

@keyframes alert-progress {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .skill-alert {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .skill-alert-title {
        color: #f9fafb;
    }
    
    .skill-alert-message {
        color: #d1d5db;
    }
    
    .skill-alert-close {
        color: #9ca3af;
    }
    
    .skill-alert-close:hover {
        color: #d1d5db;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .skill-alert {
        border-width: 2px;
        border-style: solid;
    }
    
    .skill-alert-success {
        border-color: #10b981;
    }
    
    .skill-alert-error {
        border-color: #ef4444;
    }
    
    .skill-alert-warning {
        border-color: #f59e0b;
    }
    
    .skill-alert-info {
        border-color: #3b82f6;
    }
    
    .skill-alert-loading {
        border-color: #8b5cf6;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .skill-alert {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .skill-alert.skill-alert-show {
        transform: none;
    }
    
    .skill-alert.skill-alert-hide {
        transform: none;
    }
    
    .fa-spin {
        animation: none;
    }
    
    .skill-alert::after {
        animation: none;
    }
}