.flora-gift-card {
    padding: 1rem;
    margin-block: 0.75rem;
    border: 1px dashed #617d35;
    border-radius: 0.875rem;
    background: #f7faef;
    color: #243025;
    text-align: start;
    font-size: 1rem;
    line-height: 1.5;
}

.flora-gift-card header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.flora-gift-card p {
    margin-block: 0.5rem;
    color: #243025;
}

.flora-gift-card label {
    display: block;
    color: #243025;
}

.flora-gift-card progress {
    display: block;
    width: 100%;
    height: 1rem;
    accent-color: #476c18;
}

.flora-gifts-pending {
    list-style: none;
}

/* Woodmart lays out every product-list item as flex; gift cards form one column. */
.woocommerce-mini-cart > li.flora-gifts-pending {
    display: block;
    padding: 0.75rem;
}

.flora-mini-gifts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.625rem;
    width: 100%;
    min-width: 0;
}

.flora-mini-gifts .flora-gift-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.75rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.flora-mini-gifts .flora-gift-card header { align-items: baseline; }

.flora-mini-gifts .flora-gift-card progress { height: 0.625rem; }

.flora-gifts-dialog {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #172509;
    overflow: auto;
}

.flora-gifts-dialog::backdrop {
    background: rgb(8 12 9 / 75%);
}

.flora-gifts-celebration {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: min(36rem, calc(100% - 2rem));
    margin: 8vh auto 2rem;
    border: 2px solid #83b735;
    border-radius: 1rem;
    background: #83b735;
    padding: 2.5rem 1.5rem 1.25rem;
    text-align: center;
}

.flora-gifts-dialog .flora-gifts-title {
    margin: 0 0 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: #345316;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1.3;
}

.flora-gifts-dialog .flora-gifts-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    background: #345316;
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
}

.flora-gifts-dialog .flora-gifts-close:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -5px;
}

.flora-gifts-won {
    display: grid;
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.flora-gifts-won li {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: #fff;
    color: #243025;
}

.flora-gifts-won img {
    width: 6rem;
    height: 6rem;
    object-fit: contain;
    border-radius: 0.5rem;
}

.flora-gifts-won p {
    margin: 0;
    color: #243025;
}

.flora-gifts-dialog .flora-gifts-confirmation {
    margin: 1rem 0 0;
    color: #172509;
}

.flora-gifts-confetti,
.flora-gifts-fireworks {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.flora-gifts-confetti i {
    position: absolute;
    top: -10%;
    left: 8%;
    width: 0.5rem;
    height: 1.1rem;
    background: #ffe06b;
    animation: flora-confetti 2.5s linear 2;
}

.flora-gifts-fireworks i {
    position: absolute;
    top: 25%;
    left: 10%;
    width: 0.5rem;
    height: 0.5rem;
    border: 2px solid #fff;
    border-radius: 50%;
    animation: flora-firework 1.8s ease-out 2;
}

.flora-gifts-confetti i:nth-child(2n) {
    background: #fff;
    animation-delay: 0.3s;
}

.flora-gifts-confetti i:nth-child(2) { left: 20%; }
.flora-gifts-confetti i:nth-child(3) { left: 32%; }
.flora-gifts-confetti i:nth-child(4) { left: 44%; }
.flora-gifts-confetti i:nth-child(5) { left: 56%; }
.flora-gifts-confetti i:nth-child(6) { left: 68%; }
.flora-gifts-confetti i:nth-child(7) { left: 80%; }
.flora-gifts-confetti i:nth-child(8) { left: 92%; }

.flora-gifts-fireworks i:nth-child(2) {
    left: 85%;
    animation-delay: 0.4s;
}

.flora-gifts-fireworks i:nth-child(3) {
    top: 70%;
    animation-delay: 0.8s;
}

.flora-gifts-fireworks i:nth-child(4) {
    top: 75%;
    left: 90%;
    animation-delay: 1.2s;
}

@keyframes flora-confetti {
    from {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
}

    to {
    transform: translateY(100vh) rotate(540deg);
    opacity: 0;
}
}

@keyframes flora-firework {
    from {
    transform: scale(0.5);
    opacity: 1;
}

    to {
    transform: scale(10);
    opacity: 0;
}
}

@media (width <= 480px) {
    .flora-gifts-celebration { padding-inline: 0.75rem; }
    .flora-gifts-dialog .flora-gifts-title { font-size: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
    .flora-gifts-confetti,
    .flora-gifts-fireworks { display: none; }
}
