// PBN Import Interface Styles

// Variables
$primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
$success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
$warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
$info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

// Animations
@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    25% { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
    50% { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
    75% { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

@keyframes confetti {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

// Main dashboard styles
.pbn-import-dashboard {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);

    .dashboard-header {
        background: $primary-gradient;
        color: white;
        padding: 40px 20px;
        text-align: center;
        position: relative;
        overflow: hidden;

        &::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            animation: pulse 4s infinite;
        }

        h1 {
            font-size: 3rem;
            margin: 0;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
            animation: slideIn 0.8s ease-out;
        }

        .subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            margin-top: 10px;
            animation: slideIn 1s ease-out;
        }
    }

    .import-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        padding: 20px;

        .import-card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;

            &::before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                height: 4px;
                background: $primary-gradient;
                transform: scaleX(0);
                transform-origin: left;
                transition: transform 0.5s ease;
            }

            &:hover {
                transform: translateY(-10px) scale(1.02);
                box-shadow: 0 10px 40px rgba(0,0,0,0.15);

                &::before {
                    transform: scaleX(1);
                }

                .card-icon {
                    transform: rotate(360deg) scale(1.2);
                }
            }

            .card-icon {
                font-size: 3rem;
                background: $primary-gradient;
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                transition: transform 0.5s ease;
                display: inline-block;
                margin-bottom: 15px;
            }

            .card-title {
                font-size: 1.4rem;
                font-weight: bold;
                margin-bottom: 10px;
                color: #333;
            }

            .card-description {
                color: #666;
                line-height: 1.6;
                margin-bottom: 20px;
            }

            .card-button {
                background: $primary-gradient;
                color: white;
                border: none;
                padding: 12px 24px;
                border-radius: 25px;
                font-weight: bold;
                cursor: pointer;
                transition: all 0.3s;
                display: inline-block;
                text-decoration: none;

                &:hover {
                    transform: translateY(-2px);
                    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
                }

                &:active {
                    transform: translateY(0);
                }
            }
        }
    }

    .progress-visualization {
        margin: 30px 20px;

        .step-timeline {
            display: flex;
            justify-content: space-between;
            position: relative;
            padding: 40px 0;

            &::before {
                content: '';
                position: absolute;
                top: 50%;
                left: 0;
                right: 0;
                height: 4px;
                background: #e0e0e0;
                z-index: 0;
            }

            .step-node {
                position: relative;
                z-index: 1;
                text-align: center;
                flex: 1;

                .node-circle {
                    width: 60px;
                    height: 60px;
                    background: white;
                    border: 4px solid #e0e0e0;
                    border-radius: 50%;
                    margin: 0 auto 10px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    transition: all 0.3s;
                    font-size: 1.5rem;
                    color: #999;

                    &.active {
                        border-color: #667eea;
                        background: $primary-gradient;
                        color: white;
                        animation: pulse 1.5s infinite;
                        box-shadow: 0 0 0 10px rgba(102,126,234,0.1);
                    }

                    &.completed {
                        border-color: #43e97b;
                        background: $success-gradient;
                        color: white;

                        .fi-check {
                            animation: bounce 0.5s;
                        }
                    }
                }

                .node-label {
                    font-size: 0.9rem;
                    color: #666;
                    font-weight: 600;
                }
            }
        }
    }
}

// Confetti effect
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;

    .confetti {
        position: absolute;
        width: 10px;
        height: 10px;
        animation: confetti 3s ease-out forwards;

        &:nth-child(odd) {
            background: #f093fb;
            animation-delay: 0.1s;
        }

        &:nth-child(even) {
            background: #667eea;
            animation-delay: 0.2s;
        }

        &:nth-child(3n) {
            background: #43e97b;
            animation-delay: 0.3s;
        }

        &:nth-child(4n) {
            background: #ffd700;
            width: 15px;
            height: 15px;
            border-radius: 50%;
        }

        &:nth-child(5n) {
            background: #ff6b6b;
            transform: rotate(45deg);
        }
    }
}

// Toast notifications
.import-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 20px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.5s ease-out;
    z-index: 1000;

    &.success {
        border-left: 4px solid #43e97b;

        .toast-icon {
            color: #43e97b;
        }
    }

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

        .toast-icon {
            color: #ffc107;
        }
    }

    &.error {
        border-left: 4px solid #ff6b6b;

        .toast-icon {
            color: #ff6b6b;
        }
    }

    .toast-icon {
        font-size: 1.5rem;
    }

    .toast-content {
        flex: 1;

        .toast-title {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .toast-message {
            color: #666;
            font-size: 0.9rem;
        }
    }

    .toast-close {
        background: none;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
        color: #999;

        &:hover {
            color: #333;
        }
    }
}

// Loading spinner variants
.spinner-pulse {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: $primary-gradient;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.spinner-dots {
    display: inline-flex;
    gap: 5px;

    span {
        width: 10px;
        height: 10px;
        background: #667eea;
        border-radius: 50%;
        animation: bounce 1.4s infinite ease-in-out both;

        &:nth-child(1) {
            animation-delay: -0.32s;
        }

        &:nth-child(2) {
            animation-delay: -0.16s;
        }
    }
}

// Responsive design
@media (max-width: 768px) {
    .pbn-import-dashboard {
        .dashboard-header h1 {
            font-size: 2rem;
        }

        .import-cards {
            grid-template-columns: 1fr;
        }

        .progress-visualization .step-timeline {
            flex-direction: column;

            &::before {
                top: 0;
                bottom: 0;
                left: 50%;
                width: 4px;
                height: auto;
            }
        }
    }
}
