/* Base notification */
.d2w {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #111;
    color: #fff;
    padding: 15px 18px;
    border-radius: 10px;
    z-index: 999999;
    width: 280px;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(10px);
}
/* Centered popup */
.d2w {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    color: #fff;
    padding: 18px 22px;
    border-radius: 12px;
    z-index: 999999;
    width: 320px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    opacity: 0;
}

/* Type styling */
.d2w.success { border-left: 4px solid gold; }
.d2w.error   { border-left: 4px solid red; }
.d2w.info    { border-left: 4px solid dodgerblue; }

/* Retry button */
.d2w-retry {
    margin-top: 12px;
    padding: 8px 14px;
    background: gold;
    color: #111;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.d2w-retry:hover {
    background: #ffd700;
}

/* Animations */
.fade   { animation: d2wFade .4s forwards; }
.slide  { animation: d2wSlide .4s forwards; }
.bounce { animation: d2wBounce .6s forwards; }

@keyframes d2wFade {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes d2wSlide {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes d2wBounce {
    0%   { opacity: 0; transform: translate(-50%, -45%); }
    50%  { opacity: 1; transform: translate(-50%, -55%); }
    100% { opacity: 1; transform: translate(-50%, -50%); }
}

/* Hide WooCommerce notices on the page */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.wc-block-components-notice-banner {
    display: none !important;
}



/* Stacking */
.d2w + .d2w {
    margin-top: 10px;
}

/* Types */
.d2w.success { border-left: 4px solid gold; }
.d2w.error   { border-left: 4px solid red; }
.d2w.info    { border-left: 4px solid dodgerblue; }

/* Retry button */
.d2w-retry {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: gold;
    color: #111;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.d2w-retry:hover {
    background: #ffd700;
}

/* Fade animation */
.fade {
    animation: d2wFade .4s forwards;
}
@keyframes d2wFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Slide animation */
.slide {
    animation: d2wSlide .4s forwards;
}
@keyframes d2wSlide {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Bounce animation */
.bounce {
    animation: d2wBounce .6s forwards;
}
@keyframes d2wBounce {
    0%   { opacity: 0; transform: translateY(10px); }
    50%  { opacity: 1; transform: translateY(-6px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media(max-width:600px){
    .d2w {
        right: 10px;
        left: 10px;
        width: auto;
    }
}
