/**
 * Apple-Style Notification System for HytLabs
 * macOS Big Sur / Monterey inspired glassmorphism notifications
 */

/* Notification Container */
.hytlabs-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
}

/* Base Notification Styles */
.hytlabs-notification {
    position: relative;
    padding: 16px 20px 16px 56px;
    border-radius: 16px;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    min-width: 300px;
    max-width: 380px;
}

/* Slide In Animation */
.hytlabs-notification.hytlabs-notification-show {
    transform: translateX(0);
    opacity: 1;
}

/* Slide Out Animation */
.hytlabs-notification.hytlabs-notification-hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Notification Types */
.hytlabs-notification-success {
    border-left: 4px solid #34C759;
}

.hytlabs-notification-success::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2334C759' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

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

.hytlabs-notification-error::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FF3B30' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.hytlabs-notification-info {
    border-left: 4px solid #007AFF;
}

.hytlabs-notification-info::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23007AFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

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

.hytlabs-notification-warning::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FF9500' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3E%3C/path%3E%3Cline x1='12' y1='9' x2='12' y2='13'%3E%3C/line%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Close Button */
.hytlabs-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.6;
    padding: 0;
}

.hytlabs-notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.hytlabs-notification-close::before {
    content: '';
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Progress Bar */
.hytlabs-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 0 16px;
    transition: width 0.1s linear;
}

.hytlabs-notification-success .hytlabs-notification-progress {
    background: linear-gradient(90deg, #34C759, #30D158);
}

.hytlabs-notification-error .hytlabs-notification-progress {
    background: linear-gradient(90deg, #FF3B30, #FF453A);
}

.hytlabs-notification-info .hytlabs-notification-progress {
    background: linear-gradient(90deg, #007AFF, #0A84FF);
}

.hytlabs-notification-warning .hytlabs-notification-progress {
    background: linear-gradient(90deg, #FF9500, #FF9F0A);
}

/* Notification Content */
.hytlabs-notification-content {
    padding-right: 24px;
}

.hytlabs-notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: #ffffff;
}

.hytlabs-notification-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .hytlabs-notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .hytlabs-notification {
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 14px 18px 14px 50px;
    }
    
    .hytlabs-notification::before {
        left: 14px;
        width: 22px;
        height: 22px;
    }
}

/* Dark mode enhancement */
@media (prefers-color-scheme: dark) {
    .hytlabs-notification {
        background: rgba(30, 30, 40, 0.98);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hytlabs-notification {
        transition: opacity 0.2s ease;
    }
    
    .hytlabs-notification-close:hover {
        transform: none;
    }
}
