/**
 * SquareWoo Notification System
 * Merkezi bildirim sistemi - Toast tarzı, sağ üst köşe, slide animasyon
 * 
 * @version 1.0.0
 * @package SquareWoo
 */


.squarewoo-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: 100%;
    pointer-events: none;
}


@media (max-width: 480px) {
    .squarewoo-notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}


.squarewoo-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

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

.squarewoo-notification.hide {
    transform: translateX(120%);
    opacity: 0;
}


.squarewoo-notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.squarewoo-notification-icon svg {
    width: 16px;
    height: 16px;
}


.squarewoo-notification-content {
    flex: 1;
    min-width: 0;
}

.squarewoo-notification-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.squarewoo-notification-message {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}


.squarewoo-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #9ca3af;
    transition: color 0.2s, background 0.2s;
    padding: 0;
}

.squarewoo-notification-close:hover {
    color: #374151;
    background: #f3f4f6;
}

.squarewoo-notification-close svg {
    width: 14px;
    height: 14px;
}


.squarewoo-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-background);
    opacity: 0.3;
    transition: width linear;
}


.squarewoo-notification--success {
    border-left: 4px solid #10b981;
}

.squarewoo-notification--success .squarewoo-notification-icon {
    background: #d1fae5;
    color: #10b981;
}

.squarewoo-notification--success .squarewoo-notification-progress {
    background: #10b981;
}

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

.squarewoo-notification--error .squarewoo-notification-icon {
    background: #fee2e2;
    color: #ef4444;
}

.squarewoo-notification--error .squarewoo-notification-progress {
    background: #ef4444;
}

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

.squarewoo-notification--warning .squarewoo-notification-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.squarewoo-notification--warning .squarewoo-notification-progress {
    background: #f59e0b;
}

.squarewoo-notification--info {
    border-left: 4px solid #3b82f6;
}

.squarewoo-notification--info .squarewoo-notification-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.squarewoo-notification--info .squarewoo-notification-progress {
    background: #3b82f6;
}

.squarewoo-notification--loading {
    border-left: 4px solid #8b5cf6;
}

.squarewoo-notification--loading .squarewoo-notification-icon {
    background: #ede9fe;
    color: #8b5cf6;
}


.squarewoo-notification--loading .squarewoo-notification-icon svg {
    animation: squarewoo-spin 1s linear infinite;
}

@keyframes squarewoo-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


.squarewoo-notification--confirm {
    border-left: 4px solid #6366f1;
}

.squarewoo-notification--confirm .squarewoo-notification-icon {
    background: #e0e7ff;
    color: #6366f1;
}

.squarewoo-notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.squarewoo-notification-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}

.squarewoo-notification-btn:active {
    transform: scale(0.98);
}

.squarewoo-notification-btn--confirm {
    background: var(--primary-background);
    color: #fff;
}

.squarewoo-notification-btn--confirm:hover {
    transform: scale(1.05);
}

.squarewoo-notification-btn--cancel {
    background: #f3f4f6;
    color: #374151;
}

.squarewoo-notification-btn--cancel:hover {
    transform: scale(1.05);
}


.squarewoo-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.squarewoo-confirm-overlay.show {
    opacity: 1;
}


.squarewoo-confirm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 999999;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 24px;
    max-width: 400px;
    width: calc(100% - 32px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.squarewoo-confirm-modal.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.squarewoo-confirm-modal.hide {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
}

.squarewoo-confirm-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    color: #f59e0b;
}

.squarewoo-confirm-icon svg {
    width: 24px;
    height: 24px;
}

.squarewoo-confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin: 0 0 8px;
}

.squarewoo-confirm-message {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin: 0 0 24px;
    line-height: 1.5;
}

.squarewoo-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.squarewoo-confirm-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    min-width: 100px;
}

.squarewoo-confirm-btn:active {
    transform: scale(0.98);
}

.squarewoo-confirm-btn--yes {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.squarewoo-confirm-btn--yes:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.squarewoo-confirm-btn--no {
    background: #f3f4f6;
    color: #374151;
}

.squarewoo-confirm-btn--no:hover {
    background: #e5e7eb;
}


@media (prefers-color-scheme: dark) {
    .squarewoo-notification {
        background: #1f2937;
    }

    .squarewoo-notification-title {
        color: #f9fafb;
    }

    .squarewoo-notification-message {
        color: #9ca3af;
    }

    .squarewoo-notification-close {
        color: #6b7280;
    }

    .squarewoo-notification-close:hover {
        color: #d1d5db;
        background: #374151;
    }

    .squarewoo-notification-btn--cancel {
        background: #374151;
        color: #d1d5db;
    }

    .squarewoo-notification-btn--cancel:hover {
        transform: scale(1.05);
    }

    .squarewoo-confirm-modal {
        background: #1f2937;
    }

    .squarewoo-confirm-title {
        color: #f9fafb;
    }

    .squarewoo-confirm-message {
        color: #9ca3af;
    }

    .squarewoo-confirm-btn--no {
        background: #374151;
        color: #d1d5db;
    }

    .squarewoo-confirm-btn--no:hover {
        background: #4b5563;
    }
}