.membership-container {
    font-family: system-ui, sans-serif;
    padding: 20px;
    max-width: 500px;
    margin: 30px auto;
}

.pay-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.membership-section {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.membership-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.change-plan-btn {
    padding: 8px 16px;
    background-color: #000;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    border: none;
    transition: background-color 0.3s;
    cursor: pointer;
}

.change-plan-btn:hover {
    background-color: #222;
}

.next-payment-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.cancel-btn {
    background-color: #e53e3e;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background-color: #c53030;
}

/* === POPUP STYLES === */
.popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: white;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    width: 350px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.popup.active .popup-content {
    transform: scale(1);
}

.popup-content button {
    padding: 10px 20px;
    font-size: 14px;
    margin: 5px 0;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.popup-content button:hover {
    background-color: #f0f0f0;
}

.popup-close-btn {
    background-color: #888;
    color: white;
    margin-top: 15px;
    font-size: 14px;
}

.popup-close-btn:hover {
    background-color: #555;
}

/* Spinner for loading button */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
