/* Subscription Status Badges */
.saturn-sub-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #e5e5e5;
    color: #777;
    display: inline-block;
    white-space: nowrap;
}

.saturn-sub-status--active {
    background: #c6e1c6;
    color: #5b841b;
}

.saturn-sub-status--cancelled {
    background: #e9afaf;
    color: #a44;
}

.saturn-sub-status--pending {
    background: #f8dda7;
    color: #94660c;
}

/* Actions Wrapper - The Core Fix */
.saturn-subscription-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap; /* Prevents wrapping on Desktop/Tablet */
}

/* Ensure the actions column expands to fit the flex content */
.woocommerce-MyAccount-subscriptions .woocommerce-orders-table__cell-order-actions {
    white-space: nowrap !important;
    width: 1%; /* Shrink-to-fit behavior */
    min-width: 200px; /* Baseline for buttons */
}

/* Button Styling */
.woocommerce-MyAccount-subscriptions .button {
    margin: 0 !important;
    white-space: nowrap !important;
}

.woocommerce-MyAccount-subscriptions .button.cancel {
    background-color: #f44336 !important;
    color: #fff !important;
}

.woocommerce-MyAccount-subscriptions .button.cancel:hover {
    background-color: #d32f2f !important;
}

/* Responsive Adjustments */
@media only screen and (max-width: 768px) {
    .woocommerce-MyAccount-subscriptions .woocommerce-orders-table__cell-order-actions {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding-top: 15px !important;
    }

    .saturn-subscription-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .saturn-subscription-actions .button {
        width: 100%;
        text-align: center;
    }
}

@media only screen and (max-width: 480px) {
    .saturn-subscription-actions {
        grid-template-columns: 1fr;
    }
}
