/* Simple Swipe-to-action Styles */
.swipe-container {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.swipe-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: flex;
    align-items: center;
}

.swipe-background-left {
    background-color: #198754;
    /* Green for Bought */
    color: white;
    padding-left: 1.5rem;
    justify-content: flex-start;
    opacity: 0;
}

.swipe-background-right {
    background-color: #dc3545;
    /* Red for Remove */
    color: white;
    padding-right: 1.5rem;
    justify-content: flex-end;
    opacity: 0;
}

.offer-card {
    position: relative;
    z-index: 1;
    transition: transform 0.1s ease-out, opacity 0.3s ease;
    background-color: white;
    height: 100%;
}

/* --- BOUGHT & REMOVE STATES --- */
.offer-card.is-bought,
.offer-card.is-removed {
    background-color: #f8f9fa !important;
}

/* Fade everything except the overlays */
.offer-card.is-bought> :not(.bought-overlay):not(.remove-overlay),
.offer-card.is-removed> :not(.bought-overlay):not(.remove-overlay) {
    opacity: 0.5;
    filter: grayscale(0.5);
}

.offer-card.is-bought.offer-highlight::after,
.offer-card.is-removed.offer-highlight::after {
    opacity: 0.1;
    /* Dull the glow on highlighted cards */
}

.bought-overlay,
.remove-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate(-50%, -50%) scale(0.5);
    pointer-events: none;
}

.bought-overlay {
    color: #198754;
}

.remove-overlay {
    color: #dc3545;
}

.offer-card.is-bought .bought-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.offer-card.is-removed .remove-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.bought-overlay i,
.remove-overlay i {
    font-size: 4rem;
    font-weight: bold;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    /* Subtle white glow for readability */
}

/* Removal Animation (if still used) */
.is-removing {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
}

.swipe-container.hidden {
    height: 0 !important;
    margin-bottom: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
}