/**
 * Fancy Product Designer - Styles du loader personnalisé
 */

/* Overlay principal */
.fpd-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.fpd-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* Container du loader */
.fpd-loader-container {
    text-align: center;
    animation: fadeInScale 0.5s ease-out;
}

/* Spinner animé */
.fpd-loader-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.fpd-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinRing 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.fpd-spinner-ring:nth-child(2) {
    width: 85%;
    height: 85%;
    top: 7.5%;
    left: 7.5%;
    border-top-color: #4CAF50;
    animation-delay: -0.3s;
}

.fpd-spinner-ring:nth-child(3) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: #2196F3;
    animation-delay: -0.6s;
}

@keyframes spinRing {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Texte du loader */
.fpd-loader-text {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Container des actions (boutons) */
.fpd-loader-actions {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.fpd-success-title {
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 50px;
    animation: fadeInDown 0.6s ease-out;
}

.fpd-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Boutons d'action */
.fpd-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px 40px;
    width: 100%;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.fpd-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.fpd-action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.fpd-action-btn svg {
    position: relative;
    z-index: 1;
}

.fpd-action-btn span {
    position: relative;
    z-index: 1;
}

/* Bouton "Aller au panier" */
.fpd-btn-cart {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}

.fpd-btn-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(76, 175, 80, 0.6);
}

.fpd-btn-cart:active {
    transform: translateY(-1px);
}

/* Bouton "Créer une autre carte" */
.fpd-btn-create {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.4);
}

.fpd-btn-create:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(33, 150, 243, 0.6);
}

.fpd-btn-create:active {
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .fpd-loader-actions {
        max-width: 90%;
        padding: 0 15px;
    }

    .fpd-success-title {
        font-size: 22px;
        margin-bottom: 35px;
    }

    .fpd-actions-buttons {
        gap: 16px;
    }

    .fpd-action-btn {
        padding: 18px 32px;
        font-size: 16px;
    }

    .fpd-loader-spinner {
        width: 100px;
        height: 100px;
    }

    .fpd-loader-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .fpd-loader-actions {
        max-width: 95%;
        padding: 0 10px;
    }

    .fpd-success-title {
        font-size: 20px;
        margin-bottom: 30px;
    }

    .fpd-action-btn {
        padding: 16px 28px;
        font-size: 15px;
        gap: 10px;
    }

    .fpd-action-btn svg {
        width: 18px;
        height: 18px;
    }
}
